System.out.println("hello") analyze error
Hello there,
I use version 14.0.2. When I write just one line code:
System.out.println("hello");
in main static method,
Analyze compain that "hello" with "class or interface expected".
But it can compile and run well.
If I change to
System.out.println(new String("hello"));
It won't compain the error.
What's wrong? Is this a bug? Thanks for reply in advanced.
Please sign in to leave a comment.
It's my fault. Accidently set the string literal as injection language with java.
Unreg/uncheck the println function with injection solved the problem.
it's better that the IDE provide a hint when it prompt errors in such circumstance. It's very difficult for new users to figure out. It did cause me much time to figure this out. It won't have any actual impact, but it's very anoy !