language: Java (sun-jdk-1.7.0_10)
date: 293 days 10 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import java.util.*;
import java.lang.*;
 
class Main
{
        public static void main (String[] args) throws java.lang.Exception
        {
                try
                { new Test(); } catch (Exception e) { e.printStackTrace(); }
 
                try
                { new Test2(); } catch (Exception e) { e.printStackTrace(); }
 
                try
                { new Test3(); } catch (Exception e) { e.printStackTrace(); }
 
                
        }
 
        static class Test
        {
                Object obj = getObject();
                Object getObject()
                { throw new RuntimeException("getObject"); }
        }
 
        static class Test2
        {
                Test2()
                {
                        throw new RuntimeException("constructor");
                }
        }
 
        static class Test3
        {
                Object obj1 = null;
                String str = obj1.toString();
        }
}