Xiamen Bank remember once school recruit technical interview

A .java object life cycle (remember incomplete)

1. The creation phase (the Created)
at the creation stage system to complete the following steps by the object creation process

  Assigned to the object memory space
  begins to construct the object
  from a superclass to a subclass of the static member initializer
  superclass member variables in order to initialize the recursive call super class constructor
 subclass member variables in order to initialize, subclass constructor method call
Once an object is create, and is assigned to some variable assignment, the state of the object to switch to the application stage

2. application stage (In Use)
object is held at least with a strong reference.

3. invisible stage (Invisible)
When an object is not visible stage, indicating that the program itself no longer holds any strong reference to the object, although the existence of these references are still in. Execution of the program is beyond the scope of the object.

4. unreachable stage (Unreachable)
object is unreachable stage means that the object is no longer referenced by any strongly held. Compared with "invisible phase", "invisible phase" refers to the program no longer holds any strong object references, some static variables loaded in this case, the object may still be under the JVM systems such as JNI or thread or hold a strong reference, these special strong references are called "GC root". There is a memory leak can cause these GC root object, can not be recovered.

The collection phase (Collected)
when the garbage collector found that the object is already in the "unreachable stage" and the garbage collector has been reassigned when ready, the object has entered a "collection phase" of the memory object. If the object already rewritten finalize () method, the terminal will be to perform operations of the method.

6. The end of the stage
when the object is executing the finalize () method still is in an unreachable state, the object into the end of the stage. At this stage is to wait for the garbage collector to reclaim the object space.

7. object space reallocation phase
garbage collector to reclaim the memory occupied by objects or redistribution, and the object is completely disappeared, called "object space reallocation stage."
 

Second, the data tables A, B do combination index field, then use the A or B alone will effect index separate it (not the time)

See A, B when the combination of two fields do index, who in front, who later, if the first A, then A alone will effect the index, B alone is not used, and vice versa. Similarly, the use of fuzzy query like, if you just use the preceding%, then there is the effect of the index, if the numbers match the double%, then the effect is no index

 

Asked two questions I did not answer well, the interviewer asked me not familiar with java, the database is not familiar with what it is good at, what candidates do (maybe I am too much food, not ready to).

Third, the project

I even asked what tools to use project, she did not understand, began to talk about the framework, the interviewer seems a bit impatient and asked me tools, I attempted to answer the eclipse, she said, is this, I think there are people asked to ask this project . Then the item in question actually asked finished.

The interviewer asked if I would like to ask what technology he, I ask now use it, she said no technology, new people come in to do first is to develop java, I always say that the development of what technology to use, what framework, and she I did not know .... I have nothing to ask of.

Fourth, campus activities

A new person interview, I asked some cases schools, campus activities or something, is still relatively easy.

 

V. Summary

Overall, not very pleasant interview, I am ready data structures, java frequently asked questions, what threads are not asked, I am prepared to explain insufficient. It is not possible fate, or to carefully prepare.

Published 16 original articles · won praise 12 · views 8089

Guess you like

Origin blog.csdn.net/ziyou434/article/details/104923129