Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.lang
Class String

    java.lang.Object
      java.lang.String

    public final class String

extends Object

An immutable string of characters.

Constructor Summary
`String(char[] c, int off, int len)` Create a String from a character array.

Method Summary
`char` | `charAt(int index)` Return the character at the given index
`boolean` | `equals(Object other)` Compares the String with an Object
`int` | `length()` Return the length of the String in characters
`char[]` | `toCharArray()` Converts the String into an array of characters
`String` | `toString()` Returns itself.
`static String` | `valueOf(Object aObj)` Converts an Object to a String

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait`

Constructor Detail

### String

    public String(char[] c,
                  int off,
                  int len)

  Create a String from a character array.

  Parameters:
    `c` - the character array
    `off` - the offset - usually 0
    `len` - the length of the String - must not be greater than c.length

Method Detail

### length

    public int length()

  Return the length of the String in characters

  Returns:
    the length of the String

### charAt

    public char charAt(int index)

  Return the character at the given index

  Returns:
    the characters at the given index

### toCharArray

    public char[] toCharArray()

  Converts the String into an array of characters

  Returns:
    the character Array

### valueOf

    public static String valueOf(Object aObj)

  Converts an Object to a String

  Returns:
    the String that represents the object

### toString

    public String toString()

  Returns itself.

  Overrides:
    `toString` in class `Object`
  Returns:
    the String itself

### equals

    public boolean equals(Object other)

  Compares the String with an Object

  Overrides:
    `equals` in class `Object`
  Returns:
    true if the String is equal to the object, false otherwise

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD