Java syntax
The syntax of the Java programming language is the set of rules defining how a Java program is written and interpreted.
The syntax is mostly derived from C and C++. Unlike C++, Java is almost exclusively an object-oriented language. There are no global functions or variables,
but there are data members which are also regarded as global variables. all code belongs to classes and all values are objects. The only exception is the primitive types, which are not represented by a class instance for performance reasons (though can be automatically converted to objects and vice versa via autoboxing). Some features like operator overloading or unsigned integer types are omitted to simplify the language and to avoid possible programming mistakes.
Java syntax is constantly improved in major JDK releases. The latest improvements to the language happened in Java SE 8(Java SE 7 introduced such language features as try
-with-resources statements and binary literals).
Basics
Identifier
An identifier is the name of an element in the code. There are certain standard naming conventions to follow when selecting names for elements. Identifiers in Java are case-sensitive.