Answer to Question #217670 in Java | JSP | JSF for abhi

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 


1
Expert's answer
2021-07-16T01:04:21-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS