This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes getting the value of string array out of object array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting the value of string array out of object array" Watch "getting the value of string array out of object array" New topic
Author

getting the value of string array out of object array

jazy smith
Ranch Hand

Joined: Nov 18, 2009
Posts: 101
Hi all,

I have piece of code as mentioned below. I want to parse each string array value associated with each object array. (e.g. for obj[0], I need the first string value as "a" and second string value as "ap" ) How would I get them ?

Any idea ?

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18708
    
    8

Just cast an entry of that object array:
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Or use generics:
 
jQuery in Action, 2nd edition
 
subject: getting the value of string array out of object array