Created
September 3, 2011 08:42
-
-
Save khannedy/1190875 to your computer and use it in GitHub Desktop.
Fitur Baru di Java 7 – Project Coin (Bagian 2)
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
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(); | |
} | |
} |
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
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(); | |
} | |
} |
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
Long nilai = 534_353_252_352L; |
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
Long nilai = 534353252352L; |
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
String pilihan = ""; | |
switch (pilihan) { | |
case "satu": | |
break; | |
case "dua": | |
break; | |
case "tiga": | |
break; | |
default: | |
break; | |
} |
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
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