Hi, at the interview on Android Dev asked a question how to create your own Java String class. I could not answer. In C ++, I roughly understand that it is possible to work there with pointers to an array (char []), etc. Who can help, maybe a small implementation with an example of use or a couple of links to the examples. I will be glad to any help! Thank!

  • Actually the class String itself - Peter Slusar
  • 3
    It so happens that during interviews they ask questions that do not imply a direct answer. Perhaps the correct answer would be - "The position of Android Dev does not involve the development of its own JDK." You're not settled in Oracle, after all ... - bobzer
  • Maybe it means how to inherit from String, then how, it is not possible to inherit from it as it is final, and if it is to create just a class, then everything is simple, save the char array inside the class. - Alexander Belov

0