Question #217670

Ask the user to enter three of their favourite television shows. Once they have entered there shows, display the results. Use an array to store the three television shows 


Expert's answer

import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
	    Scanner scan = new Scanner(System.in);
	    String  [] television = new String[3];
	    System.out.println("Enter the first favourite television show");
	    television[0] = scan.next();
		System.out.println("Enter the first favourite television show");
	    television[1] = scan.next();
	    System.out.println("Enter the first favourite television show");
	    System.out.println("The most like television shows are::  ");
	    television[2] = scan.next();
	    for(int i= 0; i<3; i++){
	        System.out.println(television[i]);
	    
	    }
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS