1. What are the basic features of object orientation?
2. What is the difference between rewriting and overloading? (Important) when should I rewrite or reload it?
3. Struts Workflow
4. What is the difference between list and set? Why design these two interfaces? Arraylist hashset rule list treeset
5. How to capture exception categories?
6. How does a deadlock occur due to the multithreading problem (Key Point?
7. Talk about the reflection mechanism?
8. Design Questions:
The elevator is divided into the inside and outside of the elevator. The elevator can only be opened outside, and can be opened inside, closed, and a program is designed. If the elevator is on the 4th floor, press the elevator to the 8th floor, run up. After you press the close button, you cannot open the door outside the elevator. If someone opens the door on the first floor, the elevator cannot run down immediately, you must wait until the floor under the button inside the elevator can run down. If someone opens the door at the button outside the elevator on the 10th floor, then the elevator must run on the 10th floor to open the door before it can run down to the 1st floor and then open the door. Please design this program.
9. Equals and hashcode Methods
10. What should I pay attention to when rewriting the equals method? (Never heard)
11. Run the program. What is the result?
Public static void main (string [] ARGs ){
Stringbuffer x = new stringbuffer ("");
Stringbuffer y = new stringbuffer ("B ");
Methoda (x, y );
System. Out. println (x + "," + y );
}
Static stringbuffer methoda (stringbuffer S1, stringbuffer S2 ){
Return s1.append (S2 );
}
12. Program questions
Public static void main (string [] ARGs ){
Collection [] C = new collection [] {New arraylist (), new hashset (), new vector ()};
For (INT I = 0; I <C. length; I ++ ){
System. Out. println (getstring (C [I]);
}
}
Static string getstring (list ){
Return "list ";
}
Static string getstring (set list ){
Return "set ";
}
Static string getstring (collection list ){
Return "Collection ";
}