Switch-Case+Formative+(Java)

/** public static void main(String[] args) { // TODO code application logic here System.out.println("What radio station would you like to listen to?\n"); Scanner kbReader = new Scanner(System.in); String choice=kbReader.nextLine; char ch=choice.charAt(0);
 * @param args the command line arguments

switch (ch) {

case '1':

System.out.println ("You have chosen number 1-98.9 The Drive!"); break; case '2': System.out.println ("You have chosen number 2-KROCK 105.7"); break; case '3': System.out.println ("You have chosen number 3-98.3 FLY FM"); break; case '4': System.out.println ("You have chosen number 4- 107.6 CBC"); }

}

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

import java.util.*; public class Main {

/** public static void main(String[] args) { // TODO code application logic here
 * @param args the command line arguments

System.out.println("What is the word for hello in Spanish?\n"); System.out.println("'a' or 'A': Uno \n"); System.out.println("'b' or 'B': Hola \n"); System.out.println("'c' or 'C': Como Estas \n"); System.out.println("'d' or 'D': Bonjour \n"); Scanner kbReader = new Scanner(System.in); String choice=kbReader.nextLine; char ch=choice.charAt(0);

switch (ch) {

case 'A': case 'a':

System.out.println ("Sorry, you are incorrect!"); break; case 'B': case 'b': System.out.println ("You are correct! Congratulations!!!"); break; case 'C': case 'c': System.out.println ("Sorry, you are incorrect!"); break; case 'D': case 'd': System.out.println ("Sorry, you are incorrect!"); }

}

}