Created
January 29, 2022 13:46
-
-
Save 0x61nas/4d10d6f587dc4f13601091e7b875a2e6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Scratch { | |
public static void main(String[] args) { | |
// Try without catch | |
try { | |
System.out.println("Hello, World!"); | |
// Exception | |
System.out.println(" 2 / 0 = " + 2 / 0); | |
} finally { | |
System.out.println("Goodbye, World!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment