Switch문
import java.io.*; public class switchans { public static void main(String[] args) { int num = 2; switch(num){ case 1: System.out.println("1"); break; case 2: System.out.println("2"); break; case 3: System.out.println("3"); break; default: System.out.println("Not 1,2,3"); break; } } }
2010.10.09