Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| public:computer:java [2022/05/31 10:36] – [References] alex | public:computer:java [2022/09/15 23:21] (current) – alex | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| + | ===== Basic ===== | ||
| + | * 기본 연산, 제어 구조 | ||
| + | * 산술 연산, 논리 연산 | ||
| + | * 자료형; 기본자료형, | ||
| + | * 비교 연산; 주요 비교 연산자, 참조형 비교, String 비교, 자료형 비교(instanceof 연산자), 논리 연산 | ||
| + | * 조건 분기; if, switch, for, while, do-while, break, continue, return | ||
| + | * 객체지향 | ||
| + | * 캡슐화 | ||
| + | * 상속 | ||
| + | * 생성자 | ||
| + | * 다형성 | ||
| + | * 인터페이스 | ||
| + | * 위임 | ||
| + | * 제네릭 | ||
| + | * 람다식 | ||
| + | |||
| + | ===== Preparing ===== | ||
| + | * 개발환경 구성 | ||
| + | * JDK | ||
| + | * IDE 혹은 TextEditor | ||
| + | * Build 도구 (Maven, Gradle) 및 의존성관리 | ||
| + | * 기타 개발 도구 | ||
| + | |||
| + | |||
| + | ===== Examples ===== | ||
| + | * '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * Local | ||
| + | * Zoned | ||
| + | * Offset | ||
| + | * Collections | ||
| + | * List; ArrayList, LinkedList | ||
| + | * Set; HashSet, LinkedHashSet | ||
| + | * Map; HashMap, LinkedHashMap | ||
| + | * | ||
| + | |||
| + | |||
| + | * 람다식 | ||
| + | |||
| + | (자료형 인수, ...) -> { ... 임의의 처리 ...} | ||
| + | |||
| + | ==== Database ==== | ||
| + | <sxh java> | ||
| + | import java.sql.*; | ||
| + | |||
| + | ... | ||
| + | ... | ||
| + | Connection conn = null; | ||
| + | | ||
| + | try | ||
| + | { | ||
| + | Class.forName(" | ||
| + | } | ||
| + | catch(ClassNotFoundException e) | ||
| + | { | ||
| + | e.printStackTrace(); | ||
| + | } | ||
| + | | ||
| + | try | ||
| + | { | ||
| + | conn = DriverManager.getConnection(" | ||
| + | | ||
| + | Statement stmt = conn.createStatement(); | ||
| + | ResultSet rset = stmt.executeQuery(" | ||
| + | | ||
| + | while(rset.next()) | ||
| + | { | ||
| + | // do something | ||
| + | } | ||
| + | } | ||
| + | catch(SQLException e) | ||
| + | { | ||
| + | e.printStackTrace(); | ||
| + | } | ||
| + | finally | ||
| + | { | ||
| + | if(conn != null) | ||
| + | { | ||
| + | try | ||
| + | { | ||
| + | conn.close(); | ||
| + | conn = null; | ||
| + | } | ||
| + | catch(SQLException e) | ||
| + | { | ||
| + | e.printStackTrace(); | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | | ||
| + | ... | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | * conn.setAutoCommit(true/ | ||
| + | * conn.commit(); | ||
| + | * conn.rollback() | ||
| + | * PreparedStatement stmt = conn.prepareStatement(" | ||
| + | * stmt.setString(1, | ||
| + | |||
| + | * DAO< | ||
| + | * DTO< | ||
| + | * JPA< | ||
| + | |||
| + | |||
| + | ==== File I/O ==== | ||
| + | * FileReader | ||
| + | * BufferedReader | ||
| + | * Scanner | ||
| + | * Files | ||
| + | |||
| + | * CSV, XML, LOGGER | ||
| + | |||
| + | |||
| + | ==== Tests ==== | ||
| + | |||
| + | * JUint | ||
| + | * @Test | ||
| + | * @Before | ||
| + | * @After | ||
| + | * @BeforeClass | ||
| + | * @AfterClass | ||
| + | * @Ignore | ||
| + | * import static org.junit.Assert.*; | ||
| + | * assertEquals() | ||
| + | * fail() | ||
| + | * assertThat() | ||
| + | * import static org.hamcrest.CoreMatchers.*; | ||
| + | * is() | ||
| + | * JMockit | ||
| + | * DbUnit | ||
| + | ==== Reserved Words ==== | ||
| + | |||
| + | * data types < | ||
| + | * byte | ||
| + | * short | ||
| + | * int | ||
| + | * long | ||
| + | * float | ||
| + | * double | ||
| + | * char | ||
| + | * boolean | ||
| + | * void | ||
| + | </ | ||
| + | |||
| + | * class & packages < | ||
| + | * class | ||
| + | * interface | ||
| + | * enum | ||
| + | * package | ||
| + | * import | ||
| + | * extends | ||
| + | * implements | ||
| + | * this | ||
| + | * super | ||
| + | * new | ||
| + | </ | ||
| + | |||
| + | * modifiers < | ||
| + | * public | ||
| + | * protected | ||
| + | * private | ||
| + | * static | ||
| + | * final | ||
| + | * abstract | ||
| + | * native | ||
| + | * volatile | ||
| + | * transient | ||
| + | * synchronized | ||
| + | * strictfp | ||
| + | </ | ||
| + | |||
| + | * operations < | ||
| + | * if | ||
| + | * else | ||
| + | * switch | ||
| + | * case | ||
| + | * default | ||
| + | * for | ||
| + | * while | ||
| + | * do | ||
| + | * break | ||
| + | * continue | ||
| + | * return | ||
| + | * instanceof | ||
| + | * assert | ||
| + | </ | ||
| + | |||
| + | * exceptions < | ||
| + | * try | ||
| + | * catch | ||
| + | * finally | ||
| + | * throw | ||
| + | * throws | ||
| + | </ | ||
| + | |||
| + | * others < | ||
| + | * const | ||
| + | * goto | ||
| + | </ | ||
| ===== References ===== | ===== References ===== | ||