943,936 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 982
  • Java RSS
Dec 4th, 2008
0

Array String

Expand Post »
Hi everybody, I'm really new to java and I'm not sure how to do this,

//Create an ArrayList of String type to hold first names of the students

I created mine like this....
ArrayList<String> first = new ArrayList<String>();
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ITlang007 is offline Offline
5 posts
since Dec 2008
Dec 4th, 2008
0

Re: Array String

Add some functionality, Compile it and run it and see if it behaves as you want.
Why do want our stamp of approval on it, its not like the world would come to an end if you get a compile error or a wrong output while trying out different combinations for a solution, you might end up discovering a lot more of the Java language that way.

BTW yes that is correct.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Dec 4th, 2008
0

Re: Array String

Thanks man, yea that is true but I'm making sure because it is my assignment.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ITlang007 is offline Offline
5 posts
since Dec 2008
Dec 4th, 2008
0

Re: Array String

Click to Expand / Collapse  Quote originally posted by ITlang007 ...
Thanks man, yea that is true but I'm making sure because it is my assignment.
Can't you compile ti and run it?
Also try to add some elements in the ArrayList and then use a for loop to print them.
Do you know how to find the API for the ArrayList?
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
Dec 4th, 2008
0

Re: Array String

There's no better way to explore and understand the Java language then to go through the javadocs, it helps you tremendously (Thats my opinion ;-))
Reputation Points: 485
Solved Threads: 89
Posting Shark
verruckt24 is offline Offline
944 posts
since Nov 2008
Dec 4th, 2008
0

Re: Array String

Click to Expand / Collapse  Quote originally posted by verruckt24 ...
There's no better way to explore and understand the Java language then to go through the javadocs,
there is off course the coding-the-damn-thing and the trying-the-crap-out approach, which, in combination with reading the api's, does a lot more than just reading it
Reputation Points: 935
Solved Threads: 356
Nearly a Posting Maven
stultuske is offline Offline
2,497 posts
since Jan 2007
Dec 4th, 2008
0

Re: Array String

I would, but I'm still not done with the program, I will let you guys know as soon as I'm done with it. I appreciate all the help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ITlang007 is offline Offline
5 posts
since Dec 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Need Help Urgently!
Next Thread in Java Forum Timeline: help with login applet.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC