1: Variable
- Member variable-{instance variable, static variable}
- Local variables
2: Arrays and strings
- The array length is immutable and the data type must be the same
- String
- Constructor method String (char a[]): Char a[]={', ', ', ', ', '},string s= new String (a);
- Direct initialization: String s= "Sssssssss";
- Initialization
- The space can be allocated first without the =new type [numeric value], such as int month=new int[12];
- Construction method =new type []{x,x,x,x,x};
- Direct initialization of ={x,x,x,x,x};
Arrays class static method call for loop (type variable: loop array name) {}; 3: Syntax
- Static
- The static method cannot call a non-static property, and the static property can be called by a non-static method
- Static code block
- Final
1:set method Set value, get method return value--method Public2: Class variable, method, constructor method private, create static final class object in Class =new class (); ___ Singleton mode
- Inherit extends
- The default inherits the properties and methods of the parent class public, implicitly inheriting private, and prohibiting subclass access
- Method and property with the same name override, to subclass first
- Polymorphic
- Parent class object =new subclass instantiation (); Down transformation
- Subclass up to parent class (cast)
- Abstract class Interface
- Just declare, not new
- The abstract Class+abstract Method (parameter) has no entities;.
- Interface
- Interface Interface Name
- The member must be instantiated (the initial value of the overlay), all constant final
- There can only be abstract methods
- Implement interface implements interface A, interface B, interface C,,,,,,,,
- Interfaces can inherit multiple interfaces to implement extensions (unlike General class single inheritance)
4: Scope of Access
Java Fundamentals Deepen