Search code examples
javajava-6

Does String object in Java store characters in a char array?


I am solving an assignment where I should not use arrays or collections to sort Integers. I am doing it with strings. I want to know whether strings in java are stored as character array.


Solution

  • Use LinkedList where implementation is not backed by an array.

    Yes String does use char array behind the scene