Code organisation
Java code is organised in a similar way to C++ code:
- The fundemental code unit is a class
- Classes are organised into packages (a package is similar to a C++ namespace)
- Compiled code is stored in a JAR file (roughly equivalent to a C++ dynamically linked library)
The difference is that some of the rules which are considered good practice in C++ are actually enforced by the compiler in Java. This tends to improve the consistency of Java code, at least in the way it is organised.
