Results 1 to 7 of 7
Thread: List of objects
- 03-20-2009, 07:43 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 8
- Rep Power
- 0
- 03-20-2009, 08:20 AM #2
Did You use List in your application?
Using List we can store Object ,Then why do you need casting?Mak
(Living @ Virtual World)
- 03-20-2009, 09:05 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 8
- Rep Power
- 0
hi,
routeObjList.get(0).locationId
if I use statements like this it is not accepting where locatioIid is attribute of class route.
- 03-20-2009, 09:17 AM #4
by add() function you can add it...
Did You try it ReKha.Mak
(Living @ Virtual World)
- 03-20-2009, 09:54 AM #5
Sample
ArrayList<emp> Obj=new ArrayList<emp>;
Obj.add(new emp());
Simple syntax for store object in arraylist,It works quite well.Mak
(Living @ Virtual World)
- 03-20-2009, 10:29 AM #6
Member
- Join Date
- Mar 2009
- Posts
- 8
- Rep Power
- 0
hi,
((Route)objList.get(0)).locationid
this casting is working properly.Thank you for your reply.
- 03-20-2009, 11:39 AM #7
Similar Threads
-
read txt file,with some records, create objects and store objects in tables of a db.
By stamv in forum JDBCReplies: 1Last Post: 01-22-2009, 04:25 PM -
Linked List integer list
By igniteflow in forum Advanced JavaReplies: 1Last Post: 12-10-2008, 08:53 PM -
Two Objects
By losintikfos in forum New To JavaReplies: 3Last Post: 11-14-2008, 07:04 PM -
How to access ArrayList in List of List?
By alvations in forum New To JavaReplies: 5Last Post: 10-08-2008, 12:23 PM -
Getting objects from a list
By markyoung1984 in forum New To JavaReplies: 4Last Post: 03-13-2008, 10:45 PM
Bookmarks