several topics

1. What are the types of JVM memory overflows and how to deal with them?
Answer: There are mainly three kinds of heap space oom, permanent space oom and disable to create new native thread
1) heap space oom starts the virtual machine to set the minimum and maximum value and code monitoring
2) permanent space oom set -XX permsize
3) disable to create new native thread, adjust the heap size and the number of threads, use the thread pool

java8, there is no permanent space, and transfer it to the system memory METASPACE

2. GC types
Answer : GC is divided into full gc and minor gc, and it is necessary to avoid full gc as much as possible

3. The class loading process
Five steps: Loading verification prepares parsing and initialization
1) Loading
(1) Obtaining binary byte stream by class name
(2) Converting binary byte stream into runtime data structure
(3) Generating a class representing this class in the java permanent area Object, as the entry point of access
2) Verification
(1) File format verification
(2) Metadata verification
(3) Bytecode verification
3) Prepare allocate memory
for class variables (static variables) and set initial values

​​4) Parse
the constant pool Symbolic references in are replaced with direct references, resolution includes class, field, class method and interface method resolution
5) Initialization The java program code defined in the class is
actually


executed. 5) hash
(1) If the objects are equal, the hashCode must be equal;
(2) The objects with equal hashCode may not be equal.

6) hash algorithm

7) redis supports concurrent number calculation

8) design principle OCP

9) design pattern

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326803578&siteId=291194637