Scanner input = new Scanner(System.in);
System.out.println("Enter Your Choice:");
int choice = input.nextInt();
switch(choice) {
case 1: System.out.println("Günaydin"); break;
case 2: System.out.println("Good morning"); break;
case 3: System.out.println("Bonjour"); break;
case 4: System.out.println("Guuten Morgen"); break;
default:System.out.println("invalid input");
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter