Array

  • To return an array, use new[]{i,j}

Character

  • valueOf(char)
  • charValue()
  • isDigit(int)
  • isDigit(char)
  • isLetter(int)
  • isLetter(char)
  • isLetterOrDigit(int)
  • isLetterOrDigit(char)
  • isAlphabetic(int)

String

  • isEmpty()
    • jdk6+
    • Is same as s.length()\==0
    • It does not check whitespaces
      • To check whitspaces, use s.isBlank() (jdk11+)
  • Regex
    • replaceFirs() and replaceAll() takes regex as first param and string as second
    • [^ negates the expression String regex = "[^a-zA-Z0-9]"; s = s.replaceAll(regex,"");