String
→ StringBuilder
java.util.Date
↔ java.time.Instant
java.util.Calendar
→ java.time.Instant
java.text.SimpleDateFormat
java.time
(자료형 인수, ...) -> { ... 임의의 처리 ...}
import java.sql.*; ... ... Connection conn = null; try { Class.forName("DRIVER"); } catch(ClassNotFoundException e) { e.printStackTrace(); } try { conn = DriverManager.getConnection("jdbc database", "user", "password"); Statement stmt = conn.createStatement(); ResultSet rset = stmt.executeQuery("QUERY"); while(rset.next()) { // do something } } catch(SQLException e) { e.printStackTrace(); } finally { if(conn != null) { try { conn.close(); conn = null; } catch(SQLException e) { e.printStackTrace(); } } } ... ...