java coures

 21/03/2024

    System.out.println("Enter botton number only prase a 123");
int botton = sc.nextInt();
switch (botton) {
case 1 : System.out.println("Hello");
break;
case 2 :
System.out.println("Namata");
break;
case 3 :
System.out.println("banjour");
break;
default:
System.out.println("invaild number");
}
// if (botton == 1){
// System.out.println("Hello");
// } else if ( botton == 2) {
// System.out.println("Namasata");
// }else if (botton == 3) {
// System.out.println("banjour");
// }
// else {
// System.out.println("Invalid number");
// }

एक टिप्पणी भेजें

0 टिप्पणियाँ