Errors, warnings, and bugs

The most common getting started errors are the syntax errors. They most frequently occur when we mistype a Java keyword or forget to leave a space after a keyword.

The error below occurs if you forget to leave a semicolon at the end of a line of code.

Errors, warnings, and bugs

Note

There are occasions when we don't need semicolons. We will see these as we proceed.

Look at this image that shows the error when we type a word the compiler doesn't recognize.

Errors, warnings, and bugs

Also, notice that Android Studio is giving us a warning that we have some unused variables. Warnings ...

Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.