小点

  • String name ,长度:name.length();
  • super和this 不能出现在static修饰的方法里、

 

  • 覆盖实例变量访问。
  • d.tag;
  • ((Parent)d).tag

 

  • 强制类型转换,无继承关系会引发ClassCastExceptionn异常,类型转换前可以通过instanceof 来判断是否成功。
  • if (obj instanceof String)
  • {
  •      String str=(String)  obj ;
  •  }

 

数组复制速度:

:System.arraycopy > clone > Arrays.copyOf > for 

posted @ 2019-02-27 22:29  旺仔流奶  阅读(159)  评论(0编辑  收藏  举报