3
Answers

Illegal start of expression

Photo of Andrew

Andrew

13y
2.2k
1
I got this error: "illegal start of expression" while defining static variable. I noticed that it works few minutes ago.

Code:

class Demo{

    Demo() {
        static int a = 7;
    }
}

Thanks!

Answers (3)