Social Icons

twitterfacebookgoogle pluslinkedinemail

Wednesday 4 September 2013

String handling class in java

In java,there are two String handling class available.That is the library class which is available is java.lang package.

String handling class
  1. String
  2. StringBuffer
Object of String class cannot change.we can change the value of StringBuffer class.

eg.      String  s = "Hello World";
           String  s = new String("Hello World");
               char a[] = {'a','b','c','d'};
              String s = new |String(a);
             
 here, s  is a object of String class.There are several in-built method for String handling class.



  1. length()
  2. concat()
  3. replace()
  4. substring()
  5. charAt()
  6. equals()
  7. equalsIgnoreCase()
  8. toUpperCase()
  9. toLowerCase()
  



No comments :

Post a Comment

 

Free Advertisement

Free Advertisement

Free Advertisement

Free Advertisement