Strings in Java - Methods of String Class in Java, List of String Class Methods in Java


Strings in Java, Methods of String Class in Java, List of String Class Methods in Java
                                        String Class in Java give us long list of methods to work and manipulating the Strings.




Method NameReturn Type
charAt(int index)char
compareTo(String anotherString)int
compareToIgnoreCase(String anotherString)int
concat(String anotherString)String
endsWith(String suffix)boolean
equals(String anotherString)boolean
equalsIgnoreCase(String anotherString)boolean
getChars(int srcBegin, int srcEnd,char[] dst, int dstBegin)void
indexOf(int ch)int
indexOf(int ch,fromIndex int)int
indexOf(String str)int
indexOf(String str, fromIndex int)int
lastIndexOf(int ch)int
lastIndexOf(int ch,fromIndex int)int
lastIndexOf(String str)int
lastIndexOf(String str, fromIndex int)int
regionMatches(int toOffset,String other,int offset, int len)boolean
length()int
replace(char oldChar, char newChar)String
startsWith(String prefix)boolean
substring(int beginIndex)String
substring(int beginIndex, int endIndex)String
toCharArray()char[]
toLowerCase()String
toString()String
toUpperCase()String
trim()String
copyValueOf(char[] data)String
valueOf(char c)String
valueOf(char[] data)String
valueOf(double d)String
valueOf(float f)String
valueOf(int i)String
valueOf(long l)String

{ 0 comments... read them below or add one }

Post a Comment