Java char data type. A 16-bit unsigned integer.

  • Supports original 16-bit Unicode.
  • Supports 21-bit Unicode 3.0

String:

  • substring is O(1) in Java 6, but O(n) since Java 7 update 6
  • concat is O(n)

StringBuilder:

  • Underlying implementation. Resizing char[] array and length
  • substring is O(n)
  • concat is O(1)

StringBuffer is threadsafe and slower.

Radix. Number of digits R in alphabet. e.g. radix of English alphabet is 26.

results matching ""

    No results matching ""