All variable must be declared and data types must be specified. A variable cannot change data type. It doesn't provide support for the key object-oriented features outlined below. However, with inheritance and implements together, Java can achieve most multiple inheritance objectives in a more stable manner. Only function-level variables are private.
All functions are public.
By contrast, the Java compiler explicitly disallows many actions that might cause later problems. Java defaults number to zero, boolean to false and String or other object to null. Same as JS for number and boolean. Compiler stops it. Compiler stops it.