A few days ago, I learned that a lovely young girl in primary school won the United States group Java post 4 offfer, resulting in more and more I feel that I really order chicken, my weak heart was hit by ten thousand points!

Mei Tuan, is in the boss on the resume, also cast once before, resume did not pass the selection, then let the students help to change the resume, re-cast another department, got the interview opportunity. At noon on April 23rd, HR called to make an appointment for an interview at 4:30pm. They said they would write codes online and asked me to prepare for the network environment. Didn’t call at 5:30, got stood up. After re-communicating with HR, we decided to meet again next Monday afternoon. However, it seems that communicating with HR to make an appointment is of no use in Meituan.

Envy envy, but this again for my code word to provide material (ha ha ha), we today roughly share a student sister this United States group Java4 aspects of the experience, look at people interview asked what ** (and in the end with “Java interview + learning resources”) **.

Meituan Java post (about 20 minutes)

At 7 o ‘clock in the evening, I was just ready to go out to play badminton because I thought I would have an interview next Monday. The phone call from Beijing came. The e interviewer apologized for the delay.

Algorithm problem: give a number string, ask to divide into valid IP address, find out all the results

Input: s = "25525511135" Output: ["255.255.11.135","255.255.111.35"] Input: s = "0000" Output: ["0.0.0.0"] Input: s = "101023" [" 1.0.10.23 1.0.102.3 ", ""," 10.1.0.23 ", "10.10.2.3", "101.0.2.3"]Copy the code

I was in a hurry. I guess the interviewer just finished the meeting and didn’t have a meal. He told me to wait, maybe have another colleague meet me, maybe just tell me the result. From the voice and tone of the interviewer, I judged that he must be the boss of the department and asked too many questions. Later, HR told me that he was the boss of the department I wanted to go to. Ha ha..

Meituan Java Post 2 (60 minutes)

Part 01 Technical Problems

  • How does Java connect to a database using JDBC?

  • How to implement thread safety?

  • How do I create a thread? How do I create a thread pool?

  • What kind of locks are there?

  • Know anything about Spring Boot

  • Redis features

  • What data structures does Redis have?

  • Which redis commands are used?

  • Redis application?

  • Why is Redis single threaded?

  • Redis replication and clustering?

  • Persistence of Redis?

  • Two strategies for RDB?

  • What are the advantages and disadvantages of RDB and AOF?

Part 02 project

  • Introduce the project
  • Tell me about the SEC kill process
  • How to solve the oversold?
  • Why redis?
  • What if the stock is not sold out?
  • How about the Jmeter pressure gauge?
  • What does a message queue do?
  • How to reduce inventory?
  • Second kill suddenly want to increase inventory how to do?

Part 03 Algorithm

  • Given a non-empty list of words, return the first k occurrences of the most common words. The answers returned should be sorted in order of word frequency. If different words have the same frequency, sort them alphabetically.

Meituan Java Post three sides (75min)

  • To introduce myself
  • Chat program
  • What are the seven parameters of ThreadPoolExecutor? How to configure it? Can you talk about the number of core threads, maximum threads, and the number of work queues?
  • What are the execution steps after a task is submitted in ThreadPoolExecutor?
  • What type of task do you need to pass in if I want a task to return a result?
  • Have other design patterns been used to solve similar problems? (Question in the project, pull dynamic proxy, also ask the difference between the two dynamic proxy implementations, which Spring AOP uses)
  • Has Spring AOP ever had a proxy failure? Where have you used AOP?
  • Talk about Spring transaction management?
  • (Interspersed with an algorithm, SQL questions)
  • What exceptions have you encountered during development? How did you deal with it? (null pointer, SQL exception, cast exception)
  • A variety of null pointer exception judgment
  • Algorithm: There is a positive integer n (n < 100), expect to find a minimum multiple of n m (m < 2^ 64-1) and M consists of only 1 and 0, for example: input n = 2 output m = 10, input n = 3 output m = 111

Meituan Java Post HR (15min)

  • Where person? Can you work in another place?
  • How is your study? Did you enter a competition or win a scholarship?
  • What was your role in the project?
  • How many points in the college entrance examination and so on

How to prepare for a Java interview?

When it comes to preparing for a Java interview, the first thing you need to do is comb through your knowledge. After all, if you want to enter dachang, you need to have more knowledge trees and master a more comprehensive knowledge system, so you need to comb the knowledge systematically.

If feel hand-painted figure more troublesome, Java knowledge context can be reference for below before I hand a roughly knowledge graph (Java knowledge system huge, I am using xmind map of context, in this paper, we can’t upload the original, screenshot below, the content too much so that the picture is not clear, but can provide share the original).

In addition, I think this “Java High Score Interview Guide” is very good, contains 25 topics, ** the whole 1000+ questions 50W + word analysis, enough to brush your head:

  • JavaOOP
  • Java collections/generics
  • IO and NIO in Java
  • Java reflection
  • Java serialization
  • Java annotations
  • Multithreading & Concurrency
  • JVM
  • Mysql
  • Redis
  • Memcached
  • MongoDB
  • Spring
  • Spring Boot
  • Spring Cloud
  • RabbitMQ
  • Dubbo
  • MyBatis
  • ZooKeeper
  • The data structure
  • algorithm
  • Elasticsearch
  • Kafka
  • Micro service
  • Linux

Finally, there is the latest compilation of 2021 “Java advanced core knowledge parsing”, it is the most appropriate to brush it, including the whole 30 types of knowledge set:

  • JVM
  • JAVA collection
  • JAVA multithreaded concurrency
  • JAVA based
  • Principle of the Spring
  • Micro service
  • Netty and RPC
  • network
  • The log
  • Zookeeper
  • Kafka
  • RabbitMQ
  • Hbase
  • MongoDB
  • Cassandra
  • Design patterns
  • Load balancing
  • The database
  • Consistency hashing
  • JAVA algorithm
  • The data structure
  • The encryption algorithm
  • Distributed cache
  • Hadoop
  • Spark
  • Storm
  • YARN
  • Machine learning
  • Cloud computing

Help you learn from the Learning route to the Interview brush questions to the core knowledge supplement, the full set of Java learning resources can be shared!