728x90
1.
| 1 | O |
| 2 | X (중괄호 사용) |
| 3 | X (\ -> $) |
| 4 | O |
| 5 | O |
| 6 | O |
| 7 | X (지역변수와 소속변수) |
| 8 | O |
| 9 | X (배열은 참조형) |
| 10 | X (유니코드) |
2.
| 1 | 변수 |
| 2 | 패키지 |
| 3 | 필드 |
| 4 | 키워드 |
| 5 | 유니코드 |
| 6 | 주석 |
| 7 | 참조형 |
| 8 | 127 |
| 9 | 변수 선언 |
| 10 | 메소드 |
3.
| 1 | 가 |
| 2 | 나 |
| 3 | 다 (식별자->예약어) |
| 4 | 다 |
| 5 | 나 |
| 6 | 나 |
| 7 | 나 |
| 8 | 가 |
| 9 | 다 |
| 10 | 가 (예. int형 0x1D) |
4.
| 1 | 1 12 123 |
| 2 | C C++ JAVA |
| 3 | 12.5 3.4 8.9 |
5.
| 1 | public class JavaTest1 { public static void main(String[] args){ System.out.println("Java is simple."); } } |
| 2 | public class JavaTest2 { public static void main(String[] args){ System.out.println(3+4); } } |
| 3 | public class JavaTest3 { public static void main(String[] args){ System.out.println('A'); } } |
| 4 | public class JavaTest4 { public static void main(String[] args){ System.out.println(4.5); } } |
| 5 | public class JavaTest5 { public static void main(String[] args){ System.out.println('A'); } } |
6.
| 1 | public class PrintfTest1 { public static void main(String[] args){ System.out.printf("%d %f %s", 10, 3.7854, "정수"); } } |
| 2 | public class PrintfTest2 { public static void main(String[] args){ int year = 2014; double amount = 1_000_000; System.out.format("%1$d %2$f", year, amount); } } |
| 3 | public class InitValue { static String name = "JAVA"; public static void main(String[] args){ int year = 2014; //변수 입력 System.out.format("%s는 %d년에 개발되었다.", name, year); } } |
| 4 | public class Declaration{ public static void main(String[] args){ int year = 1995; System.out.format("자바는 %d년에 개발되었다.", year); } } |
| 5 | public class TypeTest { public static void main(String[] args) System.out.println('\uac00'); System.out.println('\128');//오류! System.out.format("%d%n", 30); System.out.format("%f%n", 3.4e3); System.out.println(true); } } |
728x90
'JAVA > 절대 JAVA' 카테고리의 다른 글
| [절대JAVA] 8장 연습문제 7번 (0) | 2021.05.31 |
|---|---|
| [절대JAVA] CH02프로그래밍 기초_프로그래밍연습 (0) | 2021.04.20 |
| [절대JAVA] Ch03 연산자와 조건_내용점검 연습 (2) | 2021.04.19 |
| [절대 JAVA] CH01 자바개요_내용점검 연습 (0) | 2021.04.18 |