Array String

Thread Solved

Join Date: Dec 2008
Posts: 5
Reputation: ITlang007 is an unknown quantity at this point 
Solved Threads: 0
ITlang007 ITlang007 is offline Offline
Newbie Poster

Array String

 
0
  #1
Dec 4th, 2008
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>();
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Array String

 
0
  #2
Dec 4th, 2008
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.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: ITlang007 is an unknown quantity at this point 
Solved Threads: 0
ITlang007 ITlang007 is offline Offline
Newbie Poster

Re: Array String

 
0
  #3
Dec 4th, 2008
Thanks man, yea that is true but I'm making sure because it is my assignment.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,653
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 223
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Array String

 
0
  #4
Dec 4th, 2008
Originally Posted by ITlang007 View Post
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?
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 823
Reputation: verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough 
Solved Threads: 73
verruckt24's Avatar
verruckt24 verruckt24 is offline Offline
Practically a Posting Shark

Re: Array String

 
0
  #5
Dec 4th, 2008
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 ;-))
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: Array String

 
0
  #6
Dec 4th, 2008
Originally Posted by verruckt24 View Post
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: ITlang007 is an unknown quantity at this point 
Solved Threads: 0
ITlang007 ITlang007 is offline Offline
Newbie Poster

Re: Array String

 
0
  #7
Dec 4th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC