Hi there, I'm back again and this time I have another question:
So I figured out that I have to use Array Lists for my last question, but now, I have another problem: How do I get all the user inputs separated into different strings so that the user may be able to input data about those separate strings?
The code below is what I have so far, I'm sorry if my stupidity is over 9000 lol:
import java.util.Scanner;
import java.util.ArrayList;
public class SheetCounter
{
static Scanner userin = new Scanner (System.in);
static ArrayList <String> bleh = new ArrayList <String>();
static ArrayList <Integer> numberofsheets = new ArrayList <Integer>();
public static void main (String[] args)
{
System.out.println("Welcome to the (Creative Name Here)");
String test = "";
while (test != "n")
{
System.out.println("Please input the name of a user you wish to count:");
bleh.add(userin.next());
test = userin.nextLine();
System.out.println("Do you wish to add any other names?");
System.out.println("Type 'y' if you do, type 'n' if you do not");
test = userin.nextLine();
if (test.equals("n"))
{
break;
}
}
System.out.println("These are all the users you have added: " + bleh);
}
}