Page 1 of 1

Main.java x 1 class Main { 2▼ public static void main(String[] args) { 3 System.out.println("Hello world!"); 4 5 } } Con

Posted: Fri Jul 08, 2022 6:44 am
by answerhappygod
Main Java X 1 Class Main 2 Public Static Void Main String Args 3 System Out Println Hello World 4 5 Con 1
Main Java X 1 Class Main 2 Public Static Void Main String Args 3 System Out Println Hello World 4 5 Con 1 (28.62 KiB) Viewed 32 times
Main.java x 1 class Main { 2▼ public static void main(String[] args) { 3 System.out.println("Hello world!"); 4 5 } } Console Shell Instructions Lab Assignment 9 Write a program which will prompt for a user entry from the console. The entry must be from numbers 1 to 5. Print out to the name of the corresponding fruit, based on user entry. For numbers other than 1 to 5, there should be a message stating "Invalid" entry. Use switch/case statement to complete this lab. 1 = Apple 2 = Orange 3 = Banana 4 = Pear 5 = Grapes