728x90
    
    
  public class Ex08 {
    public static void main(String[] args){
        int score = 3;
        
        switch(score*100){
        case 100: System.out.println("score: 100");
        case 200: System.out.println("score: 200");
        case 300: System.out.println("score: 300");
        case 400: System.out.println("score: 400");
        default: System.out.println("none");        
        }
    }
}

728x90
    
    
  'JAVA > 예제' 카테고리의 다른 글
| [JAVA] ch04-11. FOR 문 (0) | 2017.08.21 | 
|---|---|
| [JAVA] ch04-09. 경품 추천 (0) | 2017.08.21 | 
| [JAVA] ch04-07. SWITCH ~ CASE 문 2 (0) | 2017.08.21 | 
| [JAVA] ch04-06. SWITCH ~ CASE 문 (0) | 2017.08.21 | 
| [JAVA] ch04-05. 등급 나누기 (0) | 2017.08.21 | 
			
			
				
			
댓글