Wrapper_Ex3

Posted 2015. 4. 10. 15:55

package chap9;

// switch 구문의 조건값으로 사용가능한 자료형
// byte  Byte
// short Short
// int  Integer
// char  Character
//
// String  jdk 7.0 이후

public class WrapperEx3 {
 public static void main(String[] args) {
  Byte s = 1; // auto Boxing
  switch( s ){
  case 1:
   System.out.println("성공");
   break;
  default :
   System.out.println("실패");
   break;
  }
 }
}

'Java !!!' 카테고리의 다른 글

Generic_1  (0) 2015.04.14
Collection 종류 및 내용 정리  (0) 2015.04.12
Wrapper_Ex2  (0) 2015.04.10
WrapperClass  (0) 2015.04.10
String  (0) 2015.04.10