“” 在java里是啥?

空字符串""到底是什么,有什么特征?

经过试验,发现:

  

   "" != null    //true

    "".length() = 1

    "".charAt(0);  //报异常,java.lang.StringIndexOutOfBoundsException

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.