If you’ve ever had an interview with a large company, you’ve probably come across some open-ended questions:
Write a program that fires five Young GC’s, three Full GC’s, and then three Young GC’s. 2. If a Java process suddenly disappears, how do you troubleshoot this problem? 3, Give a Spring load Bean code snippet, explain the specific implementation process?
Does it look difficult or different from the questions in the “bank” you prepared? Don’t know where to start? If you feel this way, then you need to work on your skills.
Faced with so many technical interviews, how to say that their skills have passed?
1. Opening Remarks
Briefly introduce your work experience and responsibilities, the main work content in school or work, the main responsible content; (Your information is clearly written on your resume, which is intended to relieve the pressure of the interviewer.)
Introduce the project or platform with technical highlights that you are most satisfied with, and highlight the technical details of the part that you are responsible for. (The main test candidates to do their own things have a clear description, judge the complexity of the things to do)
Second, Java multithreading
-
Why create a thread pool? How to create a thread pool;
-
The life cycle of a thread, when dead processes occur;
-
Talk about thread safety, what is implemented and how to implement thread safety;
-
What are the core parameters for creating a thread pool? How to size thread pools properly?
-
Usage scenarios and principles of volatile and ThreadLocal;
-
When will ThreadLocal get OOM? Why is that?
-
Synchronized, volatile, synchronized lock granularity, simulated deadlock scenarios, atomicity and visibility;
Third, JVM related
-
JVM memory model, GC mechanism and principle;
-
What are the differences between Minor and Full GC? When does the Full GC trigger? What algorithms are used?
-
There are several classloaders in the JVM. Why more?
-
What is the parent delegate mechanism? Describes some of the operational processes, benefits of the parental delegation model;
-
When do we need to break the parental delegation model;
-
What are common JVM tuning methods? What parameters can be adjusted and what values can be adjusted?
-
How the JVM memory partition, class loader, garbage collection algorithm, garbage collector, class file structure is resolved;
Java extension
-
The realization principle and application scenario of red-black tree;
-
What is NIO? What scenarios are applicable?
-
What Java9 improves over Java8;
-
What is the data structure inside a HashMap? How is it implemented at the bottom? (ConcurrentHashMap, HashMap, HashTable, etc., may also be extended to explore the depth of understanding of technical details);
-
Talk about the use and implementation of reflection, whether reflection is slow, and whether we should avoid using reflection in our projects;
-
Talk about the scenario and implementation of custom annotations.
-
List differs from Map, Arraylist differs from LinkedList, Arraylist differs from Vector;
Fifth, Spring related
-
Spring AOP implementation principles and scenarios?
-
The scope and lifecycle of Spring beans;
-
What improvements does Spring Boot have over Spring? What improvements Spring 5 has made over Spring4;
-
How to customize a Spring Boot Starter?
-
What is Spring IOC? What are the advantages?
-
SpringMVC, dynamic proxy, reflection, AOP principles, transaction isolation level;
Middleware
-
Dubbo complete a call link introduction;
-
How many load balancing strategies does Dubbo support?
-
How does the Dubbo Provider service Provider control the maximum number of concurrent requests to be executed?
-
How many configurations does Dubbo support when starting up?
-
How many messaging middleware products do you know? The advantages and disadvantages of each product;
-
How does messaging middleware ensure message consistency and retry mechanism?
-
Spring Cloud circuit breaker mechanism;
-
In contrast to Dubbo, when should Spring Cloud be used?
7. Database
-
Lock mechanism: row lock, table lock, exclusive lock, shared lock;
-
The business scenario and implementation of optimistic lock;
-
Transaction introduction, understanding of distributed things, common solutions, what is two-phase commit, three-phase commit;
-
MySQL records binlogs in three different ways. Okay? What are the pros and cons of each mode?
-
MySQL, pessimistic lock, optimistic lock, exclusive lock, shared lock, table level lock, row level lock;
-
Principle of distributed transaction 2 phase commit, synchronous, asynchronous, blocking, non-blocking;
-
Database transaction isolation level, MySQL default isolation level, how Spring implements transactions, how JDBC implements transactions, nested transaction implementation, distributed transaction implementation;
-
The whole SQL analysis, execution process principle, SQL row column;
Eight, Redis
-
Why is Redis so fast? What are the problems with using multiple threads in Redis?
-
Which data structures Redis supports;
-
Redis skip list problem;
-
Redis Single-process single-thread Redis how can high concurrency be achieved?
-
How to use Redis to implement distributed locks?
-
The atomicity of distributed lock operations in Redis, how is it implemented internally?
Nine, other
What source code have you seen? And then ask some detailed questions based on what you said about the source code? (Here is mainly to investigate whether the interviewer has the spirit of technical research, or just stay on the surface, or recite a few interviews, this for many obsessive-compulsive interviewers, if you have not even read the source code, basically will pass, for example, I am so!)
Ten, finally
In fact, step by step, not only by brushing questions before the interview so simple, more or usual accumulation. This article is a compilation of the core knowledge of the path to Java Advanced Architect. It is also a must-ask knowledge for the interview. These include basics, Java collections, JVMS, multi-threaded concurrency, Spring principles, microservices, Netty and RPC, Kafka, diaries, design patterns, Java algorithms, databases, Zookeeper, distributed caching, data structures, and more
Because the details of the content is too much so only edited part of the knowledge of the chapter rough introduction, each chapter of the small nodes inside have more detailed content! The following is part of the chapter table of contents. The full PDF version has been sorted out. If you need it, you can click here for free with screenshots.
JVM
-
thread
-
JVM memory region
-
JVM runtime memory
-
Garbage collection and algorithms
-
JAVA four reference types
-
GC generation collection algorithm VS partition collection algorithm
-
GC garbage collector
-
JAVA IO/NIO
-
JVM class loading mechanism
JAVA collection
-
Interface inheritance and implementation
-
List
-
ArrayList
-
Vector (Array implementation, thread synchronization)
-
LinkList
-
Set
-
HashSet
-
TreeSet
JAVA multithreaded concurrency
-
JAVA Concurrent Knowledge base
-
JAVA thread implementation/creation
-
Four thread pools
-
Thread life cycle (state)
-
There are four ways to terminate a thread
-
To sleep is different from to wait
-
Start is different from run
-
JAVA background thread
-
JAVA lock
-
Thread Basics 4.1.11. Thread context switching
-
Synchronous locks and deadlocks
-
Thread Pool Principle
-
JAVA blocking queue principle
-
CyclicBarrier, CountDownLatch, Semaphore
-
The role of the volatile keyword (variable visibility, disallow reordering)
-
How do I share data between two threads
JAVA based
-
JAVA exception classification and processing
-
JAVA reflection
-
JAVA annotations
-
JAVA inner class
-
JAVA generics
-
JAVA serialization (creating reusable JAVA objects)
-
JAVA copy
Principle of the Spring
-
Spring characteristics
-
Spring Core Components
-
Spring Common Modules
-
Spring is mainly package
-
Spring Spring
-
Spring third-party integration
-
Principle of the Spring IOC
-
Spring APO principle
-
Spring MVC principles
-
Spring Boot principle
-
JPA principle
-
Mybatis cache
-
Tomcat architecture
Due to the space limitation, the detailed information of the PDF document is too comprehensive, the details are too much, so only part of the knowledge point screenshots out of the rough introduction, each small node there are more detailed content! The program ape (yuan) can click here with screenshots for free;
Micro service
-
Service Registration Discovery
-
API gateway
-
Configuration center
-
Event scheduling (Kafka)
-
Service Tracking (starter-sleUTH)
-
Service fuse (Hystrix)
-
Hystrix circuit breaker mechanism
-
API management
Netty and RPC
-
Netty principle
-
Netty high-performance
-
Netty RPC implementation
-
The key technology
-
The core processes
-
Message codec
-
The communication process
-
RMI implementation
Distributed cache
-
Cache avalanche
-
The cache to penetrate
-
Cache warming
-
The cache update
-
Cache the drop
network
-
Network layer 7 architecture
-
Principle of TCP/IP
-
TCP three handshakes/four waves
-
Principle of HTTP
-
Principle of CDN
-
Distribution service system
-
Load balancing system
-
Management system
The log
-
Slf4j
-
Log4j
-
LogBack
-
Advantages of Logback
-
ELK
Zookeeper
-
Zookeeper concepts
-
Zookeeper role
-
How Zookeeper works (Atomic Broadcast)
-
Znode has four types of directory nodes
Kafka
-
Kafka concept
-
Kafka data storage design
-
Partition data file (offset, MessageSize, data)
-
Data file segment (sequential read and write, segment command, binary search)
-
Data file index (segmented index, sparse storage)
-
Producer design
-
Load balancing (partitions are evenly distributed among different brokers)
-
Batch send
-
Compression (GZIP or Snappy)
-
Consumer design
RabbitMQ
-
The RabbitMQ concept
-
The RabbitMQ architecture
-
Exchange type
Hbase
-
Hbase concept
-
The column type storage
-
Hbase Core Concepts
-
Hbase Core Architecture
-
Hbase write logic
-
HBase vs Cassandra
-
MongoDB
-
Directing a concept
-
Mongo characteristics
Cassandra
-
Cassandra concept
-
The data model
-
Cassandra is consistent with Hash and virtual nodes
-
Gossip protocols
-
Data replication
-
Data write requests and coordinators
-
Data read request and background repair
-
Data stores (CommitLog, MemTable, and SSTable)
-
Secondary index (Generate RowKey for the value summary to be indexed)
-
Read and write data
Design patterns
-
Design principles
-
Factory method pattern
-
Abstract Factory pattern
-
The singleton pattern
-
Builder model
-
The prototype pattern
-
Adapter mode
-
Decorator mode
-
The proxy pattern
-
The appearance model
-
The bridge model
-
Portfolio model
-
The flyweight pattern
-
The strategy pattern
-
Template method pattern
-
Observer model
-
Iterative pattern
-
Chain of Responsibility model
-
Command mode
-
Memo mode
Load balancing
-
Layer 4 load balancing vs Layer 7 load balancing
-
Load balancing algorithm/policy
-
LVS
-
Keepalive
-
Nginx reverse proxy load balancer
-
HAProxy
The database
-
The storage engine
-
The index
-
Database three paradigm
-
Databases are transactions
-
Stored procedures (a set of SQL statements for a specific function)
-
Trigger (a piece of program that can execute automatically)
-
Database concurrency Strategy
-
The database lock
-
Redis based distributed lock
-
The partition table
-
Two-phase commit protocol
-
Three-phase commit protocol
-
Flexible transaction
-
CAP
Consistency algorithm
-
Paxos
-
Zab
-
Raft
-
NWR
-
Gossip
-
Consistency of the Hash
-
Consistent Hash feature
-
Consistent Hash principle
JAVA algorithm
-
Binary search
-
Bubble sort algorithm
-
Insertion sort algorithm
-
Quicksort algorithm
-
Hill sorting algorithm
-
Merge sort algorithm
-
Bucket sorting algorithm
-
Radix sort algorithm
-
Pruning algorithm
-
Backtracking algorithm
-
Shortest path algorithm
-
Largest array algorithm
-
Longest common suborder algorithm
-
Minimum spanning tree algorithm
The data structure
-
The stack (stack)
-
Queue
-
Linked list
-
Hash Table
-
Sort binary trees
-
Red and black tree
-
B-TREE
-
The bitmap
Due to the space limitation, the detailed information of the PDF document is too comprehensive, the details are too much, so only part of the knowledge point screenshots out of the rough introduction, each small node there are more detailed content! If you need it, you can click here to get it for free with screenshots.
The ~