How many java interview questions do you know

1 Please explain java cross platform mechanism
2 What are the basic data types? What is the difference between basic data types and reference types
3 "Which sorting algorithms do you know? Please explain the basic idea of ​​binary search."
4 Please write bubble sort or selection sort on the spot.
5 "What is the difference between String and StringBuilder? What is immutable String object?"
6 Please explain the three major characteristics of object-oriented.
7 What are the characteristics and differences between abstract classes and interfaces?
8 Please write a singleton pattern on the spot.
9 Do you understand the factory pattern? Please explain briefly?
10 Please explain overriding and overloading separately? Can the return value type be used to distinguish overloads? Can the visible scope of the method be narrowed during the rewriting process? In overriding, can the method of the subclass declare more exceptions than the superclass?
11 The difference between == and equals 12 Where can the
final keyword be used and what does it mean?
13 The difference between class variables (static) and instance variables
14 What are the access modifiers? What is the meaning?
15 Please explain the visible range of protected members
16 What is the difference between error and exception?
17 What is the difference between runtime exceptions and check period exceptions
18 Tell at least three of the check period exceptions
19 Tell at least five kinds of runtime exceptions 20 What is the
difference between Set and List 21 What is



the implementation mechanism of ArrayList and LinkedList? What are the advantages and disadvantages of each?
22 When is the idea of ​​rewriting equals and hashCode rewriting? When to use Comparable and Comparator interfaces?
23 What do generics do?
24 What are the characteristics of queues and stacks?
25 What are the common data structures?
26 What is the difference between HashMap and TreeMap?
27 Classification and characteristics of IO flow
28 "The role of Serializable serialization interface? What is object serialization?"
29 What is packaging flow? What are the common packaging flows?
30 Copy a file on this machine to other places, what is your code idea? Say this level of pseudocode! How can you tell if you have read the end of the file? How to use buffered streams?
31xml parsing methods are there several? Or answer the idea of ​​parsing xml in dom form.
What is the meaning of 32Class?
33 What are the ways to get the Class object? How to create an instance using reflection? How to dynamically call a method using reflection?
34 What is a thread? What is the difference between thread and process?
35 Two ways to implement threads and their differences.
36 Various states and transitions between states in the thread life cycle. Please explain the meaning of the synchronized keyword and the meaning and function of wait and notify. What is the difference between waitand sleep?
37 What do you think annotations do? What annotations have you used?
38 How do you use unit tests in your project? Are you using jUnit3 or jUnit4 which asserts the execution order of several annotations in jUnit4, such as when will the method annotated by beforeClass be executed?
39 "Given a collection of multiple engineer objects, the user can choose the output method, such as output in the order of salary level or in reverse order, and output in the order of entry time or in reverse order. Please state the implementation idea. (Pseudocode level)"
40" There is an engineer management system that can store the information of several engineers, and requires the program to automatically load the last saved data when it is started next time. What is your implementation idea? (pseudocode level)”

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326310899&siteId=291194637