일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 모바일게임
- 붕괴3
- 세나
- 윈도우 10
- Http Live Streaming Server
- HTML
- Sculpt Erogonomic Desktop
- Windows 10
- VBA
- JEUS
- JEUS6.0
- 다윈스트리밍서버
- 간접 표현식
- gson
- 윈도우10
- ubuntu
- 다윈 스트리밍 서버
- 세븐나이츠
- 클래시 로얄
- 초대장
- 간접표현식
- 하스스톤
- jQuery
- bluestack
- 처비
- WiFi
- IT
- Clash Royale
- IT 인코딩 encoding
- WebtoB
Archives
- Today
- Total
공책
기본 자료형 실습 본문
public class Ex1 {
public static void main(String[] args) {
boolean b = true;
System.out.println("b의 값 : " + b);
//문자형은 홑따음표 안에 넣어줘야 하며 한글자 이상 넣을 수 없다.
char ch = 'A';
System.out.println("ch의 값 : " + ch);
//유니코드로 A를 의미하는 한글자가 들어 간 것
char ch2 = '\u0041';
System.out.println("ch2의 값 : " + ch2);
//아스키코드로 65+1 = 66 의 값인 B가 출력된다
char ch3 = 65+1;
System.out.println("ch3의 값 : " + ch3);
//정수형
byte b1 = 127;
short s1 = 32000;
int n1 = 550;
System.out.println("b1 : " + b1);
System.out.println("s1 : " + s1);
System.out.println("n1 : " + n1);
//실수형
float f1 = 3.14f;
float f2 = 150;
System.out.println("f1 : " + f1);
System.out.println("f2 : " + f2);
}
}
Comments