In java,there are two String handling class available.That is the library class which is available is java.lang package.
String handling class
- String
- 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.
- length()
- concat()
- replace()
- substring()
- charAt()
- equals()
- equalsIgnoreCase()
- toUpperCase()
- toLowerCase()
No comments :
Post a Comment