You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods that can help you code quicker and better.
String/Array
toCharArray() //get char array of a StringcharAt(intx) //get a char at the specific indexlength() //string lengthlength//array size substring(intbeginIndex)
substring(intbeginIndex, intendIndex)
Integer.valueOf() //string to integerString.valueOf() //integer to stringArrays.sort() //sort an arrayArrays.toString(char[] a) //convert to stringArrays.copyOf(T[] original, intnewLength)
System.arraycopy(Objectsrc, intsrcPos, Objectdest, intdestPos, intlength)
isEmpty() //checks whether a string is empty or not.compareTo(Strings) //compares two strings lexicographically//The method returns 0 if the string is equal to the other string. A value less than 0 is returned if the string is less than the other //string (less characters) and a value greater than 0 if the string is greater than the other string (more characters).compareToIgnoreCase(Strings) //compares two strings lexicographically, ignoring lower case and upper case differences.