String Cheatsheet

String Cheat sheet for Quick Revision

  • String Object is used for holding String of text.
  • Part of java.lang package.
  • Strings can be added by using concatenation Operator(+).
  • Characters use single quotes(‘ ‘) as delimiter while Strings use double quotes(” “) as delimiters. 
  • String objects are immutable. Value of the string object can not be changed once assigned.
  • String class is final means method of the String class can not be overriden.
  • All String literals are added to String pool by JVM.
  • String have method length() while Array have a property length to check the length.
  • To overcome the immutable property of String StringBuffer and StringBuilder comes into picture.

2 Comments String Cheatsheet

Leave A Comment

Your email address will not be published. Required fields are marked *