This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 18541
    
    8

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

Joined: Oct 27, 2005
Posts: 19656
    
  18

Or use generics:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getting the value of string array out of object array
 
Similar Threads
problem with advance for loop
Iterator problem
Manipulations with array list.
problem with retriving values from hashtable
Printing a List backwards