3
Answers

Illegal start of expression

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)