Interview remaining issues of java

1. The consequences of whether to call the super generated in the instance of a subclass object when, if you do not write SUPER keywords, then the JVM will automatically call no parent class constructor parameter, if there is need to use the parent class's constructor parameters , you must use the keyword SUPER mass participation, no matter at what time, examples of subclasses of objects when they are first call the parent class constructor
2.runnable for multiple threads access the same resource situation,
thread used in the start method is not necessarily executed immediately,
Use wait will cause the current thread to wait until another thread invokes the object's notify () method or the notifyAll method or use of interrupt.
A thread calls the wait method, the current thread into a wait state, the initiative to release the mutex, the thread into the state of block, cpu will not give time

Guess you like

Origin blog.csdn.net/baibaichenchen/article/details/52528959