Here is the code:
public class TryStuffOutHere
{
public static void main(String[] args)
{
System.out.println("Set the customer's name: ");
}
}
When I type this, IntelliJ IDEA stops highlighting the string "Set the customer's name: " in all one color like it does for other string literals, and puts the red squiggly line between the words and displays "Expression statement is not an assignment or call." But, if I change the line to:
System.out.print("Set the customer's name: ");
The string again looks like a normal string assignment (all one color, no inspection flagging).
Even declaring the string separately and outputting the variable still produces the issue.
I've attached three images illustrating what I am talking about. Does anyone have any ideas about what is going on? Apparently, I am not allowed to post images yet. If you want/need screenshots, let me know. I'd be glad to sent them your way.
UPDATE (April 28th, 2013): Well, I now have enough points to add screenshots. So, here they are:
Image 1
Image 2
Image 3
Image 4
I've also discovered that the 10-12 second delay after invalidating the caches and restarting the IDE is because the IDE is still "updating the indices". After it does, the issue immediately pops up...sometimes. Further complicating it is that invalidating the caches and restarting has worked twice, until I quit and open the IDE again, at which point it resurfaces.
It looks like it tries to interpret the code as some other language than java.
Do yo have some extra plugins active? Try to disable as many as possible just to make sure that none of them are interfering
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With