Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 710 Bytes

File metadata and controls

19 lines (10 loc) · 710 Bytes

in the process of learning

Reference:

etc

  1. two types of array declaration: dataType[] arrayRefVar; and dataType arrayRefVar;. The former is preferred, while the latter is for the convenience of C++ programmers.

  2. length length() size(). length属性针对数组,length()针对字符串string,size()针对泛型集合。

  3. List lt; 会报错 List lt = new ArrayList(); 则不会报错。自定义对象如果不初始化,再访问时报错java.lang.NullPointerException

  4. ==比较字符串实质是比较地址,永远不相等,应该使用equals()方法。

data structure

arraylist

https://blog.csdn.net/GongchuangSu/article/details/51514389