1.
class Test {
public static void main(String[] args) {
boolean b = false;
char c = 'A';
int i = 100;
double d = 10.5;
System.out.println(b);
System.out.println(c);
System.out.println(i);
System.out.println(d);
}
}
2.
class Test {
public static void main(String[] args) {
char c = ' ';
String s = "";
}
}
3.
class Test {
public static void main(String[] args) {
String s = "\"hello\'";
System.out.println(s);
}
}
'Programming > Java' 카테고리의 다른 글
If (0) | 2011.01.06 |
---|---|
연산자 (0) | 2011.01.05 |
프로모션 , 디모션 (0) | 2011.01.05 |
문법 규칙 , 자료형 (0) | 2011.01.04 |
JAVA 6 SE 환경설정 (0) | 2011.01.04 |