BlueJ 2.1.3 is giving the error message

Asked By 0 points N/A Posted on -
qa-featured

Hi,

BlueJ 2.1.3 is giving me the following error message which says “illegal start of expression”. Is there any way to fix this issue? Any help would be really appreciated. Thanks.

Illegal start of expression No help available

Message

Illegal start of expression

No help available

OK

SHARE
Answered By 5 points N/A #172261

BlueJ 2.1.3 is giving the error message

qa-featured

Hello Matthew

That error you receive is usually showing up when variables declared in the main method can not have access modifiers. Any variables that you declared in the main method can't be accessed by your class methods.

Anything you want accessible by class methods should be defined in the class.

Having an empty main method means absolutely nothing happens when the program runs.

As I do not have the text that you have tried to compile, please make sure all the above are corrected, and that your {} are well placed.

I hope you will find this information useful.

Randolph

Related Questions