Android Job Interview Questions
In this post, I tried to wrote some Job interview questions, that I met during my Job interview journey. Yeah, some of the them are still so fresh, because I mess up them a lot. However, A sketch notebook is always better than a good memory, especially in the situation of the lack practice exercise. finalize function The finalize method is used in JVM’s GC collection. But, it was said that it never guaranteed to be called during the collection, that’s means unpredictable, so I guess why I should put the resource release code into an unpredictable method, still be puzzled. How to write a singleton and thread-safe class? Following is an ordinary Singleton class without thread-safe features. public class Singular { private static Singular sInstance ; private Singular ( ) { } public static Singular getInstance ( ) { if ( sInstance = = null ) { sInstance = new Singular ( ) ; } return sInstance ; ...