I am having a little problem getting the data out of my array. It's probably something simple that I am missing but here is my code.

public class Search Sort {

    static Scanner cons = new Scanner(System.in);
    public static void main(String[] args) {
        
        
        String[] mov = new String[3];
        for(int i = 0;i < mov.length;i++){
        	System.out.println("please Enter the name of the Movie");
        mov[i] = cons.nextLine();
        }
    
    
}
}

I want it to take all 3 movies in and then output them in list order so I can sort and then search through them. Help?

Have you tried using a for loop to print each element of the array? That's how I usually go about displaying the contents of an array.

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.