Saturday, July 11, 2015

String class

Instance Methods of String class
1.       char charAt(int index)
2.       boolean equals(String str)
3.       boolean equalsIgnoreCase(String str)
4.       int compareTo(String other)
5.       int compareToIgnoreCase(String other)
6.       String concat(String str)
7.       boolean endsWith(String str)
8.       boolean startsWith(String str)
9.       byte[] getBytes(); // uses default charset of platform
10.   byte[] getBytes(String charsetName)
11.   int indexOf(int ch)
12.   int indexOf(int ch, int fromIndex)
13.   int indexOf(String str)
14.   int indexOf(String str, int fromIndex)
15.   int lastIndexOf(int ch)
16.   int lastIndexOf(int ch, int fromIndex)
17.   int length();
18.   String replace(char old, char new)
19.   String replace(String old, String new)
20.   String replaceFirst(String old, String new)
21.   String[] split(String breakPoint)
22.   String substring(int beginIndex)
23.   String substring(int beginIndex, int endIndex)
24.   char[] toCharArray()
25.   String toLowerCase()
26.   String toUpperCase()
27.   String trim()
28.   static String valueOf( Any Primitive Type)

No comments:

Post a Comment