Skip to content

Instantly share code, notes, and snippets.

View techindepth's full-sized avatar
👋

ANISH ANTONY techindepth

👋
View GitHub Profile
class Mineral {
}
class Gem extends Mineral {
}
public class Miner {
static int x = 7;
static String s = null;
public class Test {
static String s = "-";
public static void main(String[] args) {
try {
throw new Exception();
} catch (Exception e) {
try {
try {
throw new Exception();
public class Test extends Utils {
public static void main(String[] args) {
Utils u = new Test();
System.out.print(u.getInt(args[0]));
}
int getInt(String arg) {
return Integer.parseInt(arg);
}
}
public class Test {
static String s = "-";
public static void main(String[] args) {
new Test().s1();
System.out.println(s);
}
void s1() {
try {
public class Test {
public static void main(String[] args) {
String s = "-";
try {
doMath(args[0]);
s += "t "; // line 6
} finally {
System.out.println(s += "f ");
}
}
import java.io.FileNotFoundException;
class Master {
String doFileStuff() throws FileNotFoundException {
return "a";
}
}
public class Test extends Master {
class TestException extends Exception {
}
public class Test {
public String sayHello(String name) throws TestException {
if(name == null) {
throw new TestException();
}
public class Test {
static void test() {
try {
String x = null;
System.out.print(x.toString() + " ");
} finally {
System.out.print("finally ");
}
}
public class Test {
static int[] a;
static {
a[0] = 2;
}
public static void main(String[] args) {
}
}
public class Test {
public static void main(String[] args) {
try {
// some code here
} catch (NullPointerException e1) {
System.out.print("a");
} catch (RuntimeException e2) {
System.out.print("b");
} finally {
System.out.print("c");