0% found this document useful (0 votes)
44 views1 page

Sno. String Class Methods Stringbuffer Methods

This document lists common methods for the String and StringBuffer classes in Java, including methods to manipulate case, replace characters, trim whitespace, compare strings, extract substrings, check for presence of characters, and more. It also provides examples of using String.valueOf() and toString() to convert between primitive types and Strings.

Uploaded by

prakhar20feb
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

Sno. String Class Methods Stringbuffer Methods

This document lists common methods for the String and StringBuffer classes in Java, including methods to manipulate case, replace characters, trim whitespace, compare strings, extract substrings, check for presence of characters, and more. It also provides examples of using String.valueOf() and toString() to convert between primitive types and Strings.

Uploaded by

prakhar20feb
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Sno.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

String Class Methods s1.toLowerCase s1.toUpperCase s1.replace('x','y') s1.trim() s1.equals(s2) s1.equalsIgnoreCase(s2) s1.length() s1.charAt(n) s1.compareTo(s2) s1.concat(s2) s1.substring(n) s1.substring(n,m) String.valueOf(p) p.toString() s1.indexof('x') s1.indexof('x',n) s1.getChars(m,n,arr,index) startsWith() endsWith() equals vs ==

StringBuffer Methods length() capacity() setLength() charAt(n) setCharAt(index, char) insert(index,str) insert(index,char) reverse() delete(sindex,eindex) deleteCharAt(index) replace(sindex, eindex, string) substring(startindex) substring(startindex, endindex) append()

You might also like