Tell us why isn't String‘s .length() accurate?
Submitted by: MuhammadIt isn't accurate because it will only account for the number of characters within the String. In other words, it will fail to account for code points outside of what is called the BMP (Basic Multilingual Plane), that is, code points with a value of U+10000 or greater.
The reason is historical: when Java was first defined, one of its goal was to treat all text as Unicode; but at this time, Unicode did not define code points outside of the BMP. By the time Unicode defined such code points, it was too late for char to be changed.
Submitted by: Muhammad
The reason is historical: when Java was first defined, one of its goal was to treat all text as Unicode; but at this time, Unicode did not define code points outside of the BMP. By the time Unicode defined such code points, it was too late for char to be changed.
Submitted by: Muhammad
Read Online Full Stack Developer (Java) Job Interview Questions And Answers
Top Full Stack Developer (Java) Questions
☺ | Tell me what is Bridge pattern? |
☺ | Can you please explain what is CORS? How does it work? |
☺ | Tell me what is your favorite language and why? |
☺ | Tell us are you aware of design patterns? |
☺ | Explain me what Are The Latest Trends In Full Stack Web Development? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |