java Learning
1.when code a class,The initial should be a capital
2.commonly,a class def in a private file
3.the java is public if not define
4.Person p = new Person();
the 2nd Person is access a consture functions
5.when comes a nullpointerexeptions, there must be a data uninitialed
6.clarify the progress when create a obj
7.the reference type and basic type
ref:obj and string so on ;
ref will be changed in func
but string cannot be changed:as the JDK API, a final before string’s defination
8.static:
1.static can be use without obj but class exactly
2.staic func can only use static in a class
3.once program start, static being create
4.satic most code for a func that surly being use once create a obj
9.static block:(static 块)
some codes all static->same for every class and obj
10.java extend:con only extend one in java
1.rewirte:
2.super.tell()//use the func of fateher
3.
java class and obj
最新推荐文章于 2024-10-05 12:07:50 发布