How To Correctly Use Arry-Lists In Java? : For my school work I've been given the task to create a  simple bookstore program for Java. So far I've managed to create a working program to display and store data once its been inputted by the user, my problem now is that I want to show the data once the user ends the program so all the data they entered will be displayed. What I want is for the Author, Price, Publisher and ISBN inputted data be displayed under these headings. I know you use arry lists to do this but I don't have any idea how to do this in Java, any help is much appreciated.



	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String[]
			title=new String[100],
			author=new String[100],
			publisher=new String[100],
			ISBN=new String[100];
		    boolean endinput = false;
		    boolean Yes = true;
		    double[] price=new double[100];
		    System.out.println("Welcome To Kieran's Bookstore");
			while (Yes) {
		      	
	            System.out.println("Input The Title:");
	            title[0] = scan.next();
	            System.out.println("Input The Author:");
	            author[0] = scan.next();
	            System.out.println("Input The Price Of The Book:");
	            scan.next();
	            System.out.println("Input The Publisher:");
	            publisher[0] = scan.next();
	            System.out.println("Input The ISBN:");
	            ISBN[0] = scan.next();
	            System.out.println("Would you like to continue?(Yes/endinput)");
	            String ans = scan.next();
	            if (ans.equals("endinput") || (scan.equals("endinput"))) {
	                Yes = false;
	                System.exit(0);

	            }
	        }
	    }
}     
 
 

