Skip to content

Instantly share code, notes, and snippets.

@khannedy
Created September 3, 2011 08:42
Show Gist options
  • Save khannedy/1190875 to your computer and use it in GitHub Desktop.
Save khannedy/1190875 to your computer and use it in GitHub Desktop.
Fitur Baru di Java 7 – Project Coin (Bagian 2)
FileInputStream stream = null;
try {
stream = new FileInputStream("");
URL url = new URL("");
} catch (FileNotFoundException | MalformedURLException ex) {
ex.printStackTrace();
} finally {
try {
stream.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
FileInputStream stream = null;
try {
stream = new FileInputStream("");
URL url = new URL("");
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} catch (MalformedURLException ex) {
ex.printStackTrace();
} finally {
try {
stream.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
Long nilai = 534_353_252_352L;
Long nilai = 534353252352L;
String pilihan = "";
switch (pilihan) {
case "satu":
break;
case "dua":
break;
case "tiga":
break;
default:
break;
}
String pilihan = "";
if (pilihan.equals("satu")) {
} else if (pilihan.equals("dua")) {
} else if (pilihan.equals("tiga")) {
} else {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment