Skip to the content.

Java basic

Variables

Operator

Operators Precedence    
postfix expr++ expr–    
unary ++expr –expr +expr -expr ~ !    
multiplicative * / %    
additive + -    
shift « » »>    
relational < > <= >= instanceof    
equality == !=    
bitwise AND &    
bitwise exclusive OR ^    
bitwise inclusive OR      
logical AND &&    
logical OR      
ternary ? :    
assignment = += -= *= /= %= &= ^= = «= »= »>=  

Expressions, Statements, and Blocks

Control Flow Statements

The statements inside your source files are generally executed from top to bottom, in the order that they appear. Control flow statements, however, break up the flow of execution by employing decision making, looping, and branching, enabling your program to conditionally execute particular blocks of code. This section describes the decision-making statements (if-then, if-then-else, switch), the looping statements (for, while, do-while), and the branching statements (break, continue, return) supported by the Java programming language.


What does it mean to compile code?

When you compile code, the compilor (usually another program) takes the program the human wrote, and converts it into the program the computer can understand (i.e. converts from Java to machine language). The very short version could be, yes, compile means to make the code executable.

Something you may run into is people saying code does or does not compile. This means the compilor they used checks to make sure their program is written correctly according to the rules of the programming language. For example, most programming languages make you put a semicolon (;) at the end of every line. A very common mistake is to forget that semicolon, so when you try and compile the compilor gives you an error.


Making Sense of Java’s API Documentation

Java’s API Documentation