String in Java Archive
In java Integer is a wrapper class of int. As of Java 5, java provide automatic conversion to int to Integer and Integer to int, it also called Auto-boxing feature of java. But converting String …
In java, string objects are immutable because String objects are cached in String pool. Immutable simply means unmodifiable or unchangeable means once string object is created its data or state can’t be changed but a …
Description: This method has followings variants which depends on the passed parameters. This method returns the string representation of the passed argument. valueOf(boolean b): Returns the string representation of the boolean argument. valueOf(char c) : …
Description: This method returns a copy of the string, with leading and trailing whitespace omitted. Syntax: Here is the syntax of this method: public String trim() Parameters: Here is the detail of parameters: NA Return …
Description: This method has two variants. First variant converts all of the characters in this String to upper case using the rules of the given Locale. This is equivalent to calling toUpperCase(Locale.getDefault()). Second variant take …
Description: This method returns itself a string Syntax: Here is the syntax of this method: public String toString() Parameters: Here is the detail of parameters: NA Return Value: This method returns the string itself. Example: …
Description: This method has two variants. First variant converts all of the characters in this String to lower case using the rules of the given Locale. This is equivalent to calling toLowerCase(Locale.getDefault()). Second variant take …