class="java" name="code"> public class SwitchTest { /** * @param args */ public static void main(String[] args) { String name = "computer"; switch(name){ case "notebook": System.out.println("notebook"); break; case "computer": System.out.println("computer"); break; case "mobile": System.out.println("mobile"); break; default: System.out.println("nothing"); break; } } }