Default Keyword in Java
Default Keyword in Java #DarkHers #darkhers #program #code #java #bhfyp #youtubeshorts - YouTube ________________________________________________
package Test;
public class DefaultKeyword {
public static void main(String[] args) {
String name = "Frank";
switch(name) {
case "Alex": System.out.println(name+" is here."); break;
case "Michael": System.out.println(name+" is here."); break;
case "Kane": System.out.println(name+" is here."); break;
case "Susan": System.out.println(name+" is here."); break;
case "Luna": System.out.println(name+" is here."); break;
default: System.out.println(name+" isn't here.");
}
}
}
________________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment