String is Immutable and String Is a final class. The String class provides for strings whose value will not change.
One accessor method that you can use with both strings and string buffers is the length() method, which returns the number of characters contained in the string or the string buffer.
The methods in String Class:-
toString( )
equals( )
indexOff( )
LowerCase( )
charAt( )
compareTo( )
lastIndexOff( )
UpperCase( )
getChars( )
subString( )
trim( )
getBytes( )
concat( )
valueOf( )
toCharArray( )
replace( )
Subscribe to:
Post Comments (Atom)
private methods on Interface
Private methods can be used on interface from java 9. This will help in Avoiding code duplication. Ensuring code re-usab...
-
When an object is no longer referred to by any variable, java automatically reclaims memory used by that object. This is known as...
-
1. If a name has more the one word, then except the first word others should start with the uppercase. Examples : setLayout, addLayoutCompon...
-
Step 1: Create a shortcut for eclipse.exc Step 2: Right click eclipse short cut and add target value with “-vm "C:\Program Files\J...
No comments:
Post a Comment