Java software developers face questions spring to recruit record

1. Hashmap and Hashtable difference:

  HashMap allows keys and values ​​are null, the key or value is allowed Hashtable null.

  Hashtable is synchronized, whereas HashMap is not. HashMap is more suitable for single-threaded environment, while Hashtable suitable for multi-threaded environment.

2. Java garbage collection:

  Garbage collection is referenced object does not exist in memory or exceeds the target scope.
  Garbage collection object is to identify the target application is no longer used and discarded to release and reuse of resources.
3. Polymorphic definition:
  Polymorphism is the underlying programming language to different data types do show the ability of the same interface.
  Derived class functions can be called a base class methods or references to variables, called backward compatibility, scalability and maintainability can be improved.
4. Multithreading Thread: 

  The same time, the CPU can only handle one thread, only one thread at work (execution), and multi-threaded full use of resources.

  Open thread 4 ways, inheritance Thred, implement Runnable, implement Callble interfaces and use the thread pool.

  Life Cycle -> New -> Ready -> obstruction -> Run -> death , obstruction to run the process is mainly to see the thread loop.

5. What are set: 

  List: orderly, repeatable

  set: random, non-repeatable

  map: with key-value pairs stored

 

  

 

Guess you like

Origin www.cnblogs.com/ak918xp/p/12655860.html