1. Common Design Patterns
Singleton mode: Lazy, a hungry man, double check lock, static load, internal class loading, enumeration class loading. Ensure that a class has only one instance and provides a global access point to access it.
Proxy mode: Dynamic agent and static proxy, when to use dynamic proxy.
Adapter mode: Transforms the interface of a class into another interface that the customer wants. The adapter mode makes it possible for those classes that would otherwise not work together because of incompatible interfaces to work together.
Decorator Mode: Dynamically adds functionality to the class.
Observer pattern: sometimes referred to as the Publish/subscribe pattern, the Observer pattern defines a one-to-many dependency that allows multiple observer objects to listen to a Subject object at the same time. This subject object notifies all observer objects when the state changes, enabling them to automatically update themselves.
Policy mode: Define a series of algorithms, encapsulate them one by one, and make them interchangeable with each other.
Appearance mode: Provides a consistent interface for a set of interfaces in a subsystem, and the appearance pattern defines a high-level interface that makes this subsystem easier to use.
Command mode: Encapsulates a request into an object, allowing you to parameterize the customer with different requests.
Creator mode: Separates a complex build from its presentation so that the same build process can create different representations.
Abstract Factory mode: Provides an interface to create a series of related or interdependent objects without specifying their specific classes.
2. Basic knowledge
Java basic type which, the occupied byte and the range
The differences and connections between Set, List, and map
When to use HashMap
When to use Linkedhashmap, Concurrenthashmap, Weakhashmap
Which collection classes are thread-safe
Why set, List, map do not implement cloneable and serializable interfaces
Implementation of the CONCURRENTHASHMAP, 1.7 and 1.8
The realization of Arrays.sort
When to use Copyonarraylist
Use of volatile
Use of synchronied
The difference between the realization of Reentrantlock and synchronied
The principles and problems of CAS implementation
The realization principle of AQS
What is the difference between an interface and an abstract class, and when to use
The steps of the class loading mechanism, what to do with each step, the loading time of static and final modified member variables
Parental delegation Model
Reflection mechanism: Reflection dynamic Erase Generics, reflection dynamic call method, etc.
Dynamic binding: Parent class reference to child class object
JVM Memory management mechanism: what are the areas and what each region does
JVM garbage collection mechanism: garbage collection algorithm garbage collector garbage Collection policy
JVM parameter settings and JVM tuning
What happens when a young generation of memory overflows, and what happens when an old generation of memory overflows
Inner classes: Use and distinction of static inner classes and anonymous inner classes
Redis and memcached: When to choose Redis, when to choose memcached, what are the memory models and storage policies?
MySQL basic operations master-slave database consistency Maintenance
What are the optimization strategies for MySQL?
MySQL index implementation principle of B + Tree
What happens when the index is not hit and causes a full table scan
The difference and connection between bio NiO Aio in Java
Why bio is blocked NiO non-blocking NIO is what the model is
The overall architecture of Java IO and the design patterns used
Reactor model and Proactor model
Structure and content of HTTP request messages
HTTP three-time handshake and four-time wave
RPC Related: How to design an RPC framework that is integrated into the IO Model Transfer Protocol serialization approach
Linux command stats, sorting, previous questions, etc.
Stringbuff and StringBuilder implementations, the underlying implementation is achieved through the byte data, plus the copy of the array
Use of CAS operations
Synchronous implementation of memory cache and database consistency
Advantages and disadvantages of micro-services
Parameter issues for thread pools
IP issues How to tell if IP is in multiple IP segments
Determines whether the sum of any two numbers in an array of two is a given value
The realization of optimistic lock and pessimistic lock
Synchronized Implementation principle
The difficulties you encounter in the project and how to solve them
The highlights that you've done in the project are better
Differences between Message Queuing broadcast mode and publish/Subscribe mode
Producer Consumer Code implementation
Deadlock Code Implementation
Thread pool: parameters, the role of each parameter, the comparison of several different thread pools, the use of blocking queues, the denial policy
Future and Listenablefuture asynchronous callbacks related
Algorithm correlation: Determine whether to find out two numbers from the array and for the given value, randomly generated 1~10000 do not repeat and put into the array, the maximum and the sub-array of the array, the realization of the binary search algorithm and time complex calculation
3. Other
Algorithms: Common sorting algorithms, binary lookup, linked list correlation, array correlation, string correlation, tree correlation, etc.
Common serialization protocols and their pros and cons
Memcached memory principle, why block-based storage
What needs to be prepared to build an RPC
If the on-line server frequently appears full GC, how to troubleshoot
If a moment on the line machine suddenly changed a lot, service can't carry, how to solve
Implementation of Lur algorithm
Linkedhashmap Implement LRU
Define the data structure of the stack, implement a min function that can find the minimum stack element in the type
The solution of mass data processing
Evolution of the reactor model
Blocking, non-blocking, synchronous, asynchronous differences
Collection sub-interface
JVM Tuning Related
Zookeeper correlation, node type, how to implement service discovery and service registration
Nginx Load Balancer Related, let you to achieve load balance, how to implement
Linux commands, awk, cat, sort, cut, grep, Uniq, WC, top, etc.
Pressure test correlation, how to analyze, single-Interface pressure measurement and multi-case pressure measurement
What do you think you are a bit of what your shortcomings are
The implementation principle of spring MVC
Netty Bottom implementation, IO Model, channelpipeline implementation and principle
Design and optimization of the cache
Cache and database consistency synchronization solutions
Your project's system architecture, talk about the overall implementation
Usage scenarios for Message Queuing
The difference between ActiveMQ, RabbitMQ and Kafka
Scan to follow our public number, reply to the keyword "answer" to get more questions and answers.
Java Advanced Interview Knowledge Point Summary!