Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

String Length, String Changing Case, String Intern, Java String Tutorial

String Manipulation Part 3

6.) Manipulating Character Case

String class provides following methods to manipulate character case in String.

String toUpperCase()
String toUpperCase(Locale locale)

String toLowerCase()
String toLowerCase(Locale locale)

Note : Original String object is returned if none of the characters changed, otherwise new String object is constructed and returned.


7.) Miscellaneous methods

String trim()

This method removes white space from the front and the end of a String.

int length()

Returns length of the String.

String intern()

This method returns interned String object, if already present in the String pool. Otherwise this String is added into the pool, and then interned reference is returned.

This brings us the end of the Java String Tutorial. Please let us know your views by leaving the comment in the comments section.


<< String Manipulation 2
Your rating: None Average: 5 (1 vote)
Share this

Post new comment