1. Data structure and algorithm basis

Let’s talk about some common sorting algorithms and their complexity.

Write a bubble sort algorithm in Java

Describe the chain storage structure.

How do I traverse a binary tree?

Invert a LinkedList.

Use Java to write a recursive traversal of all files under the directory.

Second, Java foundation

The difference between an interface and an abstract class?

What are the types of exceptions in Java? How to use them separately?

What are the common collection classes? For example, how do I sort a List?

What does the implementation look like inside ArrayList and LinkedList? What are their differences and strengths and weaknesses?

What about memory overflow? Can you give me an example?

What’s the difference between equals and ==?

What does the hashCode method do?

What is NIO? What scenarios are applicable?

How to ensure thread safety of HashMap?

JVM memory structure, why GC?

NIO model, select/epoll difference, principle of multiplexing

How many bytes is a character in Java? Extension asks how many bytes are int, long, double

What are the options for creating an instance of a class?

Final /finally/ Finalize?

What’s the difference between Session and Cookie?

String/StringBuffer/StringBuilder difference, expanding to ask their implementation?

The Servlet life cycle?

How do I allocate 1 gb of memory in Java? What should I pay attention to?

Java has its own memory reclamation mechanism, but why is there a memory leak problem?

What is Java serialization and how is it implemented? (Write an example)?

String s = new String(“abc”); How many String objects are created?

Third, the JVM

The basic structure of the JVM heap.

What are the JVM garbage algorithms? The basic process of CMS garbage collection?

What are the common startup parameters that can be adjusted for the JVM?

How do I view the MEMORY usage of the JVM?

Does the Java program run out of memory? Just a few examples.

What are your common JVM configuration and tuning parameters? What do they do?

JVM memory structure?

Common GC policies, when does YGC trigger and when does FGC trigger?

Four, multithreading/concurrency

How do I create a thread? How to keep thread safe?

How to implement a thread-safe data structure

How do I avoid deadlocks

What does the Volatile keyword do?

What do you need to know about using HashMap in a multi-threaded environment? Why is that?

Is run() or start() used to start a thread in a Java program?

What is a daemon thread? What’s the use?

What is a deadlock? How to avoid

What is the difference between thread and process?

How is Threadlocal implemented in Java?

How does ConcurrentHashMap work?

To sleep is different from to wait

The difference between notify and notifyAll

The operation of the volatile keyword

Function and implementation of ThreadLocal

How do two threads execute sequentially

What does context switching mean

Can you kill a thread at run time?

What are conditional locks, read-write locks, spin locks, reentrant locks?

How does ThreadPoolExecutor work?

5. Linux use and troubleshooting

Create a file with two commands?

What’s the difference between hard links and soft links?

What are the common Linux commands?

What about the resource consumption of a Java thread?

What are the possibilities of too much Load?

What is the /etc/hosts file used for?

How do I quickly replace all “ABC” with “xyz” in a text?

How to search for error logs in log files?

If the disk space is insufficient, how can I quickly find the file that occupies the most space?

Java server troubleshooting (OOM, High CPU, High Load, Class Conflict)

Top, IOstat, VMstat, SAR, tcpdump, JVisualVM, JMap, jConsole

How to analyze Thread dump files (Runnable, lock, code stack, OS Thread ID correlation)

How do I view the thread information of a Java application?

Six, frame use

Describe the three states of Hibernate.

The life cycle of beans in Spring.

SpringMVC or Struts handles the flow of the request.

What problems does Spring AOP solve? How do you do that?

What about the propagation properties of Spring transactions? What does it affect?

What is the difference between BeanFactory and FactoryBean in Spring?

What is the principle of IOC in the Spring framework?

What are some of the ways spring does dependency injection

Struts workflow

How do I implement a facet with Spring?

How does Spring implement database transactions?

Hibernate’s use of primary and secondary caches, lazy-load understanding;

How does Mybatis implement batch submission?

7. Database related

MySQL InnoDB, Mysaim features?

What’s the difference between optimistic and pessimistic locks?

What is the database isolation level? What does it do?

Basic principles of MySQL primary/secondary synchronization.

Select * from table t where size > 10 group by size order by size

How to optimize database performance (indexes, database tables, batch operations, paging algorithm, SSD upgrade, service optimization, and primary/secondary deployment)

When SQL does not use index (does not include, does not equal, function)

Which fields should be indexed (the most filtered fields)

How do I find all rows in a table where the name field does not contain “XYZ”?

MySQL, B+ index implementation, row lock implementation, SQL optimization

Redis, RDB and AOF, how to do high availability, clustering

How to solve the problem of high concurrent inventory reduction

The index implementation mechanism in mysql storage engine;

Several granularity of database transactions;

Row lock, table lock; Optimistic lock, pessimistic lock

Network protocol and network programming

TCP The process of establishing a connection.

TCP disconnection process.

What is the logic behind the 302 redirect?

HTTP interaction flow. The difference between HTTP and HTTPS, the interaction flow of SSL?

How does Rest relate to Http? Rest is said to be lightweight. What do you think of the Rest style?

What does TCP’s sliding window protocol do? Talk about the principles.

What are the HTTP protocol methods?

The difference between a switch and a router?

The basic flow of Socket interaction?

HTTP protocol (packet structure, breakpoint continuation, multithreaded download, what is a long connection)

TCP protocol (connection process, slow start, sliding window, seven-layer model)

Webservice protocol (WSDL/SOAP format, difference from REST)

NIO benefits, Netty threading model, what is zero copy

9. Redis and other cache systems/middleware /NoSQL/ consistent Hash, etc

List a common Redis client concurrency model.

How to implement fuzzy query in HBase?

Name a common message middleware, if the message to preserve order how to achieve?

How to implement a Hashtable? How does your design take into account Hash conflicts? How to optimize?

Distributed cache, consistent hash

LRU algorithm, slab allocation, how to reduce memory fragmentation

How to solve the hot spot problem of the cache single machine

What is a Bloom filter and how does it work? What does False positive mean?

Differences between Memcache and Redis

What is the function of ZooKeeper and how does the election algorithm work

Map/Reduce process. How to combine statistics of two data sources using Map/Reduce

Design patterns and refactoring

You can give examples of some common design patterns

What principles do you follow when designing a factory bag?

Can you name an open source project/library that uses the Visitor/Decorator pattern?

What are the most common design patterns you use when coding? In what context?

How do I implement a singleton?

Proxy mode (dynamic proxy)

Singleton patterns (lazy, rogue, concurrency initialization, use of volatile and lock)

What are some of the most impressive design patterns you can use in the JDK source code?

A programmer learning platform to share with you, so that you accumulate experience in practice to master the principle. The main direction is JAVA engineers. If you want to get a high salary, want to break through the bottleneck, want to compete with others to get an advantage, want to enter BAT but worry about the interview, you can add my Java learning exchange group: 282711949.

Note: Add group requirement

1. I majored in Java in college, but I was frustrated in the interview after graduation and could not find a suitable job

2. I have been in the company for a long time and now I am comfortable, but I hit a wall in the interview when I change my job. Need to study in a short time, job-hopping to get a high salary

3. After attending the offline training, I have not mastered the knowledge deeply enough, and it is difficult to find employment. I want to further my study

4, already in the Java related departments work on the job, on their own career planning is not clear, dawdle

5, have a certain C language foundation, contact with Java development, want to change careers

Do not disturb the trumpet, do not like to add