Java common topic

zhaozj2021-02-16  99

I hope everyone gives an answer.

1. Please simply describe the three features of the object: package, inherit, and polymorphism.

2. What is the difference between accessing the modifier "public / private / protected / default modifier"?

3. What is the meaning of modifying classes, methods, and variables with keyword finAl?

4. How does the Java language processes an exception handle, keywords: throws, throw, try, catch, finally represent what significance? Can I throw an exception in the TRY block?

5. What is the finalize () method of the Object class (or its subclass) is called?

6. Is there a ".java" source file that can include multiple classes (not internal classes)? What is the limit?

7. Can the internal class can reference his membership of the group? Is there any restriction?

8. Write a piece of code to traverse the elements in a list.

9. How many ways in Java can implement a thread? What is the use of keyword modified synchronization methods? Stop () and SUSPEND () methods do not recommend it?

10. Describe the process of using Socket to establish a client and server communication (you can use code example).

11. What is the basic principle of the garbage collector? Can garbage collectors recycle memory immediately? Is there any way to actively notify the virtual machine for garbage collection?

12. Does memory leaks in Java, please briefly describe it.

13. What is the mechanism for achieving polymorphism in JAVA?

14. What is the difference between OVERLOAD and OVERRIDE (rewrite)?

15. How many types of streams in Java? JDK provides some abstract classes for each type of stream for inheritance, please say which classes are they?

16. Differences between static variables and instance variables:

17. Use the JDBC to check the database query operation, such as a staff information table (STAFF), which finds the following field (ID, name, phone, address, agn, please find the information of the employee of the ID 001 and print Out, DRIVER of the database is: "Sun.jdbc.odbc.jdbcodbcodbdriver", the database's URL uses JDBC: ODBC: People

18, what is Java serialization, how to implement Java serialization

18. Can you issue a call to a non-Static method from one STITIC method?

19. When writing a Clone () method, there is usually a line of code. What is it?

20. List, MAP, SET three interfaces, how are you with Elements?

21. Write a piece of code and traverse the elements in a list.

22. What is the difference between arraylist and vector?

23. How to determine if an object is a known class object, you can write a code description.

24. How to jump out the current multiple nesting loop in Java?

转载请注明原文地址:https://www.9cbs.com/read-11308.html

New Post(0)