Skip to content

Instantly share code, notes, and snippets.

@khannedy
Created August 31, 2011 15:42
Show Gist options
  • Save khannedy/1183860 to your computer and use it in GitHub Desktop.
Save khannedy/1183860 to your computer and use it in GitHub Desktop.
Project Coin
Connection connection = null;
try {
connection = DriverManager.getConnection("url");
// proses SQL
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
try (Connection connection = DriverManager.getConnection("url")) {
// proses SQL
} catch (SQLException e) {
e.printStackTrace();
}
List<String> list = new ArrayList<>();
Map<Long, String> map = new HashMap<>();
List<Map<Long, String>> listMap = new ArrayList<>();
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