Java String methods list

https://w‮ttual.ww‬uri.com
Java String methods list
No.MethodDescription
1char charAt(int index)It returns char value for the particular index
2int compareTo(Object o)Compare this string to another object.
3int compareTo(String anotherString)Compares two strings in lexicographical order.
4String concat(String s)concatenate two string.
5boolean contains(CharSequence s)It returns true or false after matching the sequence of char value.
6boolean equals(Object another)It checks the equality of string with the given object.
7static String format(String format, Object… args)It returns a formatted string.
8static String format(Locale l, String format, Object… args)It returns formatted string with given locale.
9static String join(CharSequence delimiter, CharSequence… elements)It returns a joined string.
10static String join(CharSequence delimiter, Iterable<? extends CharSequence> elements)It returns a joined string.
11int length()It returns string length
12String substring(int beginIndex)It returns substring for given begin index.
13String substring(int beginIndex, int endIndex)It returns substring for given begin index and end index.
Created Time:2017-09-06 07:23:21  Author:lautturi