How to Correct a Java Error Message of Illegal Statement

104 15
    • 1). Open your Java program's source code in a text editor or Integrated Development Environment (IDE).

    • 2). Scroll down to the line of code where the compiler reported an error.

    • 3). Check to make sure that your statement ends in a semi-colon and that all braces, brackets and parentheses have a proper beginning and end.

    • 4). Check to make sure that if you are creating a new object that you have done so using the proper "new Name()" syntax.

    • 5). Check to make sure that any strings on the line have the proper opening and closing quotation marks.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.