1
public String substring(int beginIndex, int endIndex)
Returns a string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
Examples:
“hamburger”.substring(4, 8) returns “urge”
“smiles”.substring(1, 5) returns “mile

2
String to char array
String aString = "abc"; char[] array = aString.toCharArray(); int n = aString.length(); char a = aString.charAt(0); // return 'a'

char array to String
String s = new String(charArray);or
String s = String.valueOf(charArray);
3
StringBuilder sb = new StringBuilder(); sb.length(); sb.append("abc"); sb.deleteCharAt(0); sb.reverse();

4
split method
s1 = "asdf.asdf" String[] str1 = s1.split("\\.");

5
String can not have the following:
charAt(3) = charAt(5); // it is wrong

An ArrayList or a dynamically resizing array, is an array that resizes as needed while still providing O(1) access.

public ArrayList<String> merge(String[] words, String[] more) {
    List<String> list = new ArrayList<String>();
    for (String s : words) {
        list.add(s);
    }
    for (String s : more) {
        list.add(s);
    }
    return list;
}

A hash table is a data structure that maps keys to values for highly efficient lookup.

A simple Java example of working with a hash map

public HashMap<Integer, Student> buildMap(Student[] students) {
    Map<Integer, Student> map = new HashMap<Integer, Student>();
    for (Student s : students) {
        map.put(s.getId(), s);
        return map;
    }
}