1.java Data types
- Built-in data type:boolean (1), Byte (8), char (+), short (8), int (+), long (+), float (+), double (+)
- Reference data type: Object, array
2. Modifiers and keywords
-
Methods declared as public in the parent class must also be public in the subclass.
-
A method declared as protected in a parent class is either declared as protected in the subclass or declared as public. cannot be declared as private.
-
The method declared by the default modifier in the parent class, which can be declared as private in the subclass.
-
The method declared as private in the parent class cannot be inherited.
3. Non-access modifiers
- The static modifier, which is used to create class methods and class variables.
- Final modifiers, which are used to modify classes, methods, and variables, the final decorated class cannot be inherited, the decorated method cannot be overridden, and the modified variable is not modified after it has been assigned a value.
- An abstract modifier that is used to create abstract classes and abstract methods.
- Synchronized and volatile modifiers, primarily for thread programming JV ' a
Java basic data types and access control characters