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

    public String a;

updjx's avatar
updjx committed
5
6
7
    public static void main(String[] args) {

        OverwriteAttributeWithUndeclaredVariable obj = new OverwriteAttributeWithUndeclaredVariable();
8

updjx's avatar
updjx committed
9
        obj.test();
10
11
12

    }

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

updjx's avatar
updjx committed
19
20
class String {
}
21
22