OverwriteAttributeWithUndeclaredVariable.invalid.mj 387 Bytes
Newer Older
1 2 3 4
class OverwriteAttributeWithUndeclaredVariable {

    public String a;

5 6 7
    public static void main(String[] args) {

        OverwriteAttributeWithUndeclaredVariable obj = new OverwriteAttributeWithUndeclaredVariable();
8

9
        obj.test();
10 11 12

    }

13 14 15 16
    public void test() {
        /*should break here because of undeclared unknown variable*/
        a = i;
    }
17 18
}

19 20
class String {
}
21 22