728x90
package Java13;
public class Test11 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String a = "14";
int b = 50;
int c = Integer.parseInt(a); //문자가 숫자로 변환
int d = c + b;
System.out.println(a + b + d);
System.out.println("-----------");
int prime_int = new Integer(11); //Wrapper class =>basic (Unboxing)
System.out.println("값" + prime_int);
Integer pri_int = new Integer(13);
System.out.println("값" + pri_int.doubleValue()); //basic => Wrapper class(Boxing)
Integer wrap_int = pri_int * 10;
System.out.println("값" + wrap_int);
}
}
'일단 해보는 코딩 > Java' 카테고리의 다른 글
[Java] 다형성(polymorphism) (0) | 2022.08.03 |
---|---|
[Java] Ramda 식 (0) | 2022.08.03 |
[Java] 컬렉션 프레임윅(Collections Framework) - ArrayList (0) | 2022.08.03 |
[Java] 컬렉션 프레임윅(Collections Framework) - Set (0) | 2022.08.03 |
[Java] 컬렉션 프레임윅(Collections Framework) - Map (0) | 2022.08.03 |