Skip to content

Instantly share code, notes, and snippets.

View sanskarbhusal's full-sized avatar
🎯
Focusing

sanskarbhusal

🎯
Focusing
View GitHub Profile
public class ExceptionExample {
public static void main(String args[]) {
try {
int x = 4;
int y = 0;
int result = x / y;
System.out.println(x + "Divided by " + y + "is: " + result);
} catch (Exception e) {
System.out.println("Division error!");
} finally {