Brief Summary of Java

Java programs are compiled into an intermediate format, known as bytecode, and then run through an interpreter that executes in a Java Virtual Machine (JVM).

The basic syntax of Java is similar to C and C++. All white space is treated equally, indent level does not matter, statements end in a semicolon, and blocks of code are enclosed between { and }.

Comments are enclosed between /* and */, or else begin with //, in which case the rest of the line is a comment.

Data Types and Variables

The integer data types are byte, short, int, and long, which correspond to numbers of 8, 16, 32, and 64 bits. The types float and double store floating-point numbers; char stores a 16-bit Unicode character, and boolean can hold one of two ...

Get Find the Bug A Book of Incorrect Programs 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.