0

Depending on whether we want ASCII characters array or extended ASCII characters array, we generally either allocate a size of 128 or 256 for an ASCII character array that needs to hold all ASCII characters(I am taking a reference of Java arrays)

Let's say we want to do the same for a unicode character array, what size do we need to allocate for that array ?

  • 3
    Can you add an example of code you are referring to when talking about allocation? – bracco23 Jul 14 '17 at 12:30
  • `Character.MAX_VALUE + 1` for UTF-16. `Character.MAX_CODE_POINT + 1` for UTF-32. –  Jul 14 '17 at 12:54
  • [this](https://stackoverflow.com/questions/5924105/how-many-characters-can-be-mapped-with-unicode) should answer your question – XtremeBaumer Jul 14 '17 at 12:54
  • What is an “ASCII character array”? All char values in Java are UTF-16 code units. – VGR Jul 14 '17 at 13:58

0 Answers0