Java中的String

主要总结一下java中,在String类中常用的方法有哪些,目前用到那些就先总结那些,以后慢慢添加,学习就是这样的,一点点的积累。

(1)length():Returns the length of this string.

(2)public char[] toCharArray():Converts this string to a new character array.

(3)public boolean equals(Object anObject):Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.

(4)public static String copyValueOf(char[] data,int offset, int count):Returns a String that represents the character sequence in the array specified.

 

 

 

你可能感兴趣的:(Java中的String)