Java interview clearance knowledge points sorting!

1. Common design patterns

  • Singleton mode: lazy, hungry, double check lock, static loading, internal class loading, enumeration class loading. Guarantees that there is only one instance of a class, and provides a global access point to it.

  • Proxy mode: dynamic proxy and static proxy, when to use dynamic proxy.

  • Adapter pattern: Convert the interface of a class into another interface that the client wants. The adapter pattern enables classes to work together that would otherwise not work together due to incompatible interfaces.

  • Decorator Pattern: Dynamically add functionality to a class.

  • Observer pattern: Sometimes referred to as the publish/subscribe pattern, the observer pattern defines a one-to-many dependency, allowing multiple observer objects to listen to a topic object at the same time. This subject object notifies all observer objects when their state changes, enabling them to update themselves automatically.

  • Strategy pattern: Define a series of algorithms, encapsulate them one by one, and make them interchangeable.

  • Facade Pattern: Provides a consistent interface for a set of interfaces in a subsystem. Facade pattern defines a high-level interface that makes the subsystem easier to use.

  • Command Pattern: Encapsulates a request as an object, allowing you to parameterize clients with different requests.

  • Creator Pattern: Decouples a complex build from its representation, allowing the same build process to create different representations.

  • Abstract Factory Pattern: Provides an interface to create a series of related or interdependent objects without specifying their concrete classes.

    2. Basic knowledge

  • What are the basic types of Java, the bytes and range they occupy
  • 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 Concurrenthashmap, implementation of 1.7 and 1.8

  • Implementation of Arrays.sort

  • When to use CopyOnArrayList

  • The use of volatile

  • Use of synchronized

  • The difference between the implementation of reentrantlock and Synchronied

  • The realization principle and problems of CAS

  • The realization principle of AQS

  • The difference between interface and abstract class, when to use

  • The steps of the class loading mechanism, what is done in each step, and the loading timing of static and final modified member variables

  • Parent delegation model

  • Reflection mechanism: reflection dynamically erases generics, reflection dynamically calls methods, etc.

  • Dynamic binding: parent class references point to child class objects

  • JVM memory management mechanism: what regions are there and what does each region do

  • JVM garbage collection mechanism: garbage collection algorithm garbage collector garbage collection strategy

  • JVM parameter setting and JVM tuning

  • What happens to the young generation memory overflow and what happens to the old generation memory overflow

  • Inner classes: the use and difference between static inner classes and anonymous inner classes

  • Redis and memcached: when to choose redis, when to choose memcached, what the memory model and storage strategy look like

  • Basic operation of MySQL master-slave database consistency maintenance

  • What are the optimization strategies of mysql

  • Implementation principle of mysql index implementation B+ tree

  • When the index will not hit, it will cause a full table scan

  • The difference and connection of bio nio aio in java

  • why bio is blocking nio is non-blocking nio is what the model looks like

  • The overall architecture of Java io and the design patterns used

  • Reactor model and Proactor model

  • http request message structure and content

  • http three handshake and four wave

  • rpc related: how to design an rpc framework, considering the serialization method of the io model transmission protocol

  • Linux command statistics, sorting, top questions, etc.

  • The implementation of StringBuff and StringBuilder, the underlying implementation is achieved by byte data, plus a copy of the array

  • The use of cas operation

  • Consistent Synchronization Implementation of Memory Cache and Database

  • Advantages and disadvantages of microservices

  • Thread pool parameter problem

  • ip problem how to judge whether ip is in multiple ip segments

  • Check whether the sum of any two numbers in an array is a given value

  • Implementation of optimistic locking and pessimistic locking

  • The principle of synchronized implementation

  • The difficulties you encountered in the project and how to solve them

  • Highlights of your work on the project

  • The difference between message queue broadcast mode and publish/subscribe mode

  • Producer Consumer Code Implementation

  • Deadlock code implementation

  • Thread pool: parameters, the role of each parameter, comparison of several different thread pools, use of blocking queues, rejection policy

  • Future is related to ListenableFuture asynchronous callback

  • Algorithm related: determine whether the sum of two numbers can be found from the array as a given value, randomly generate 1~10000 non-repetitive and put them into the array, find the maximum sum of the sub-arrays of the array, the implementation of the binary search algorithm and its time complexity calculate

    3. Other

  • Algorithms: Common sorting algorithms, binary search, linked list correlation, array correlation, string correlation, tree correlation, etc.

  • Common serialization protocols and their advantages and disadvantages

  • Memcached memory principle, why is block-based storage

  • What do you need to prepare to build an rpc

  • If the online server frequently appears full gc, how to troubleshoot

  • If the number of online machines suddenly becomes very large at a certain moment, and the service cannot be supported, how can I solve it?

  • Implementation of LUR Algorithm

  • LinkedHashMap implements LRU

  • Define the data structure of the stack, please implement a min function in this type that can find the smallest element of the stack

  • Solutions for massive data processing

  • Evolution of the reactor model

  • The difference between blocking, non-blocking, synchronous, asynchronous

  • Subinterface of Collection

  • jvm tuning related

  • zookeeper related, node type, how to implement service discovery and service registration

  • Nginx load balancing is related, let you achieve load balancing, how to achieve it

  • Linux commands, awk, cat, sort, cut, grep, uniq, wc, top, etc.

  • Stress test related, how to analyze, single port stress test and stress test in multiple situations

  • What do you think your strengths are, what are your weaknesses

  • The realization principle of spring mvc

  • Netty bottom layer implementation, IO model, ChannelPipeline implementation and principle

  • Cache Design and Optimization

  • Cache and Database Consistent Synchronization Solutions

  • The system architecture of your project, talk about the overall implementation

  • Usage scenarios for message queues

  • Differences between ActiveMQ, RabbitMQ, and Kafka

Guess you like

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