Thread
:
How to fetch an arralist element (i need the code)
View Single Post
#
7
(
permalink
)
04-21-2008, 04:26 AM
Eranga
Moderator
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,338
Quote:
Originally Posted by
raj reddy
yes, i need that element in the
public static void main method
for example like this ::: system.out.println( " the value of sel1 is " + al.sel1) //this is showing error
Yes, it's wrong. Get the element of the
al
list, you have to refer the index of that. Say sel1 is in the 0[sup]th[/sup] place in the list. To get the value,
Code:
system.out.println( " the value of sel1 is " + al.get(0));
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you?
Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Eranga
View Public Profile
Send a private message to Eranga
Find all posts by Eranga