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>();

Recommended Answers

All 6 Replies

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.

Thanks man, yea that is true but I'm making sure because it is my assignment.

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?

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 ;-))

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 :)

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.