[SOLVED] Making a list in java.
I'm compleately new to java and any other programming language aswell.
I need to make a simple program that allows the user to enter six names before the program stops taking any more input and lists the names separated by commas.
I'm having trouble figuring out how to accomplish this, and would appreciate any input that would point me in the right direction.
Other problems witht your program
Minor: you might get a nastygram indicating that you haven't initiated a variable... just make variable names = ""; to make that msg go away.
Major: You're not saving all the names that you entering... only the last (you're overwirting all the names since you're using only one variable: names). To avoid this, save the names (strings) that are entered to an array. Here's a link to what an array is and how to use it:
Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)