Created
August 31, 2011 15:42
-
-
Save khannedy/1183860 to your computer and use it in GitHub Desktop.
Project Coin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connection connection = null; | |
try { | |
connection = DriverManager.getConnection("url"); | |
// proses SQL | |
} catch (SQLException e) { | |
e.printStackTrace(); | |
} finally { | |
try { | |
connection.close(); | |
} catch (SQLException e) { | |
e.printStackTrace(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try (Connection connection = DriverManager.getConnection("url")) { | |
// proses SQL | |
} catch (SQLException e) { | |
e.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> list = new ArrayList<>(); | |
Map<Long, String> map = new HashMap<>(); | |
List<Map<Long, String>> listMap = new ArrayList<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<String> list = new ArrayList<String>(); | |
Map<Long, String> map = new HashMap<Long, String>(); | |
List<Map<Long, String>> listMap = new ArrayList<Map<Long, String>>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment