1. String is a major class
2. Length is fixed
3. Contents of object cannot be modified.
4. Object can be created by assigning String constants enclosed in double quotes.
5. String s=”MSBTE”
String Buffer:
1. StringBuffer is a peer class of String
2. Length is flexible
3. Contents of object can be modified
4. Objects can be created by calling constructor of String Buffer class using new operator.
5. StringBuffer s=new StringBuffer (“MSBTE”)
0 Comments