yet another blog

[Tech] Java Senior Interview

25 Mar 2023

Today, I watch this mock interview link

Here are some learning notes for further research:

  1. Why String length() function is not accurate?(Answer copied from Quora) It 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.

  1. What is dgc?

  2. What is the difference between finally and finalize in Java?

  3. Copy contructor in Java, clones and GC?

  4. How to handle Exceptions in Java?

  5. Life cycle of an applet?


comments powered by Disqus