only the access modifier or optional specifiers are allowed before function return type, the optional specifiers are allowed in any order.
a method with return type void is allowed to have a return statement as long as it doesn't try to return a value, return null is not allowed, because null requires a reference object as the return type, void is not a reference object.
methods allow a single vararg parameter as the last parameter declared. methods allow any numbers of arrays are parameter.
use import static to import static class members. For example, the two valid ways to import sort are import static java.util.Collections.*; and import static java.util.Collections.sort;
static method can be referenced with null, java looks at the type of the reference of null and translates the call to className.methodName()
this() may only be called as the first line of a constructor.
instance variable can be called from any instance method, but can not be called from static method.
static variable can be called from both instance method and static method.
The default constructor is only written by the compiler if no user defined constructors were provided.
the code execution order is, static variable and static initializer from top down, instance variable and instance initializer from top down, then constructor, then main.
final instance variable can be set once: in the variable declaration, an instance initializer, or a constructor.
java prefers autoboxing to varargs. For example, method(100) will call void method(Integer a){} instead of void method(int... a){}
when autoboxing, java can't convert bigger type to smaller type, so 100L is autoboxed to Long instead of cast to int.
for lamda, if there is only one parameter and it does not specify a type, the parentheses around the type parameter are optional.
variable already in use from the lambda parameter can not be redefined in function body.