Not much to say, these are the interview questions about Java that have been asked the most in BATJ interviews in recent years. You can use this as the standard! Be prepared!
Mysql
- Compared with Oracle, what are the advantages of Mysql?
- Concisely describe the names of the four transaction isolation levels supported by InnoDB in Mysql, and the differences between each level?
- What is the usage of ENUM in Mysql?
- What storage engine is used in Mysql?
- How to use Unix shell to log in to Mysql
- What kind of locks are there in Mysql? Brief introduction
JVM
- The three collection methods of GC: the principles and characteristics of mark removal, mark sorting, and copying algorithms. Where are they used? If you are asked to optimize the collection method, what ideas do you have?
- What are the GC collectors? Features of CMS collector and G1 collector.
- JVM memory is divided into several areas, what is the role of each area?
- How to judge whether an object is alive? (or how to judge GC objects)
- Briefly describe the java class loading mechanism?
- What are class loaders and what are the class loaders?
Tomcat
- What is the default port of Tomcat and how to modify it?
- What kinds of connector operating modes (optimization) does tomcat have?
- How many ways to deploy Tomcat?
- Monitor Tomcat's memory usage
- Tomcat complete process of a request
- Tomcat working mode
Redis
- How does redis master-slave replication work? How to realize the cluster mode of redis? How are redis keys addressed?
- How to design distributed locks using redis? Talk about the realization idea? Can I use zk? How to achieve? What is the difference between these two?
- Do you know the persistence of redis? How is the bottom layer implemented? What are the advantages and disadvantages?
- What are the redis expiration strategies? Does the LRU algorithm know? Write java code implementation
- Cache penetration, cache breakdown, and cache avalanche solutions?
- When choosing a cache, when to choose redis and when to choose memcached
Multithreading
- Now there are three threads T1, T2, T3. How do you ensure that T2 is executed after T1 is executed, and T3 is executed after T2 is executed?
- The difference between wait and sleep methods in java?
- Using Java to program a program that will cause a deadlock, how would you solve it?
- What are race conditions? How do you discover and resolve competition?
- Why do we execute the run() method when we call the start() method, why can’t we call the run() method directly?
- How do you wake up a blocked thread in Java?
Design Patterns
- In Java, why is it not allowed to access non-static variables from static methods?
- In Java, when do you use overloading and when do you use rewriting?
- Give examples to illustrate when you would prefer to use abstract classes instead of interfaces?
- What is the singleton design pattern in Java? Please write a thread-safe singleton pattern in Java
- What is a design pattern? Have you used any design patterns in your code?
- Please list several commonly used design patterns in JDK?
Nginx
- Please list some features of Nginx
- Please explain how Nginx handles HTTP requests.
- What are the advantages of using a "reverse proxy server"?
- Please list the best uses of Nginx server.
- Please explain how you open Nginx through a port other than 80?
- In Nginx, explain how to keep the double slash in the URL?
ActiveMQ
- What if the ActiveMQ server is down?
- Is the message retransmission interval and retransmission times in ActiveMQ?
Kafka
- What are the two conditions for Kafka to judge whether a node is still alive?
- Can Kafa consumer consume messages from specified partitions?
- Does Kafka message use Pull mode or Push mode?
- What is the message format of Kafka stored on the hard disk?
- How to place partitions in different Brokers when Kafka creates Topic
- Kafka's ack mechanism
These are the Java interview questions I summarized,
Interview question answer, how to get
One-click triple + comment, then add my VX (tkzl6666) to receive it for free.
Interview question answer, how to get
One-click triple + comment, then add my VX (tkzl6666) to receive it for free.