There are around 13 overloaded constructor inside String class
Java String
String Immutability
String Operations
- String comparison – 3 ways
- String concatenation – 2 ways
- Reverse a String contents – 4 ways
- Split a String contents – 3 ways
- Overriding toString() method to print values of ArrayList in Java
- How to left pad with zeroes to a String in Java
String Methods
- String charAt(int index) method
- String compareTo(String anotherString) method
- String compareToIgnoreCase(String str) method
- String concat(String str) method
- String contains(CharSequence s) method
- String contentEquals(StringBuffer sb) method
- String copyValueOf(char[] data) method (2)
- String endsWith(String suffix) method
- String equals(Object anObject) method
- String equalsIgnoreCase(Object anObject) method
- String format(String format, Object… args) method
- String getBytes() method (4)
- String getChars() method
- String hashCode() method
- String indexOf() method (4)
- String intern() method
- String isEmpty() method
- String join() method (2)
- String lastIndexOf() method (4)
- String length() method
- String matches(String regex) method
- String regionMatches() method (2)
- String replace(char oldChar, char newChar) method
- String replace(CharSequence target, CharSequence replacement) method
- String replaceAll(String regex, String replacement) method
- String replaceFirst(String regex, String replacement) method
- String split(String regex) method
- String split(String regex, int limit) method
- String startsWith(String prefix) method
- String startsWith(String prefix, int toffset) method
- String subSequence(int beginIndex, int endIndex) method
- String substring(int beginIndex) method
- String substring(int beginIndex, int endIndex) method
- String toCharArray() method
- String toLowerCase() method (2)
- String toUpperCase() method (2)
- String toString() method
- String trim() method
- String valueOf() method (9)
StringBuffer Methods
- StringBuffer class
- StringBuffer append() method (13)
- StringBuffer capacity() method
- StringBuffer charAt(int index) method
- StringBuffer delete(int start, int end) method
- StringBuffer deleteCharAt(int index) method
- StringBuffer ensureCapacity(int minimumCapacity) method
- StringBuffer indexOf() method (2)
- StringBuffer insert() method (12)
- StringBuffer lastIndexOf() method (2)
- StringBuffer length() method
- StringBuffer replace(int start, int end, String str) method
- StringBuffer reverse() method
- StringBuffer substring(int start, int end) method
StringBuilder Methods
- StringBuilder class
- StringBuilder append() method (13)
- StringBuilder capacity() method
- StringBuilder charAt(int index) method
- StringBuilder delete(int start, int end) method
- StringBuilder deleteCharAt(int index) method
- StringBuilder ensureCapacity(int minimumCapacity) method
- StringBuilder indexOf() method (2)
- StringBuilder insert() method (12)
- StringBuilder lastIndexOf() method (2)
- StringBuilder length() method
- StringBuilder replace(int start, int end, String str) method
- StringBuilder reverse() method
- StringBuilder substring(int start, int end) method
StringBuffer & StringBuilder operations
- How to clear or delete StringBuffer contents
- How to append new line to StringBuffer
- Difference between capacity() and length() methods of StringBuffer
- Convert first character of every word to uppercase
String and StringBuffer Sorting
String Conversion
- String to int conversion – 3 ways
- Integer to String conversion – 6 ways
- String to float conversion – 3 ways
- Float to String conversion – 6 ways
- String to double conversion – 3 ways
- Double to String conversion – 6 ways
- String to long conversion – 3 ways
- Long to String conversion – 6 ways
- String to boolean conversion – 3 ways
- Boolean to String conversion – 6 ways
- String to char conversion
- Character to String conversion – 6 ways
- String to char[] array conversion – 4 ways
- Character[] array to String conversion – 5 ways
- String to byte conversion – 3 ways
- Byte to String conversion – 5 ways
- String to byte[] array conversion
- Byte[] array to String conversion
- String to short conversion – 3 ways
- Short to String conversion – 5 ways
- StringBuffer to String conversion and vice-versa
- StringBuilder to String conversion and vice-versa
- String to Date conversion
- Date to String conversion
String v/s StringBuffer v/s StringBuilder
StringTokenizer
- StringTokenizer class with example
- Counting number of tokens using StringTokenizer
- Reversing a String by word using StringTokenizer
String Miscellaneous
- Count and print number of words and lines in a text file in Java
- Count and print number of repeated word occurrences in a String in Java
- Count and print number of repeated character occurrences in a String in Java
- Remove duplicate characters from String in Java
- How to UPPERCASE every duplicate character/occurrences in a String in Java
- How to check whether 2 strings are Anagrams in Java ?
Suggest tutorials from Contact Us page