LZ believes that the best way to learn about Java is to interview and advanceBrush + blog + book + summaryLZ will give full play to the first three aspects in this article. As for the summary, you will find that the interview is not difficult as far as you go. The second is whether you think during the process of brushing the questions, and the second is just brushing the questions.

LZ has summarized a series of frequently asked interview techniques, in-depth analysis and answers, which will help every developer who is preparing for the interview to go to the big factory.

What is an interview? According to LZ, interview is a process of continuous precipitation, summary, and good communication of professional skills and problem-solving ability. Below are some interview questions summarized by LZ. If there are any mistakes in the article, please correct them.

Java based

  1. The difference between object-oriented and procedural
  2. What are the features of the Java language?
  3. JVM JDK (JDK) and JRE (JRE
  4. Oracle JDK vs. OpenJDK
  5. The difference between Java and C++?
  6. What is the main class of a Java program how is the main class of an application different from that of a small program?
  7. What are the differences between a Java application and a small program?
  8. What’s the difference between a character constant and a string constant?
  9. Can the Constructor be override?
  10. The difference between overloading and overwriting
  11. Three major features of Java object-oriented programming: encapsulation inheritance polymorphism
  12. What is the difference between String StringBuffer and StringBuilder? Why is String immutable?
  13. Automatic packing and unpacking
  14. Why is it illegal to call a non-static member in a static method?
  15. Define the role of a constructor in Java that does nothing and takes no arguments
  16. What is the difference between import Java and Javax?
  17. What is the difference between interfaces and abstract classes?
  18. What is the difference between a member variable and a local variable?
  19. What operator is used to create an object? How is an object entity different from an object reference?
  20. What is the return value of a method? What is the function of a return value in a class method?
  21. What does a class constructor do? If a class does not declare a constructor, the program executes correctly
  22. All right? Why is that?
  23. What are the properties of constructors?
  24. How static methods differ from instance methods
  25. What is the difference between the equality of objects and the equality of references to them?
  26. The subclass constructor is called before the subclass constructor is called.
  27. == equals(important)
  28. HashCode vs. Equals (Important)
  29. Why is there only value passing in Java?
  30. Describes the basic concepts of threads, programs, and processes. And what is the relationship between them?
  31. What are the basic states of a thread?
  32. Some summary of the fifinal keyword
  33. Exception handling in Java
  34. What if some fields in Java serialization do not want to be serialized?
  35. Gets two common methods of typing with a keyboard
  36. In Java IO streams
  37. Summary of common keywords: static, fifinal, this, super
  38. Deep copy vs shallow copy

Java basic questions answer analysis

Java collection

  1. What is the difference between a List, a Set, and a Map?
  2. Is Arraylist different from LinkedList?
  3. How is an ArrayList different from a Vector? Why replace Vector with Arraylist?
  4. Let’s talk about how ArrayList can be expanded
  5. HashMap is different from HashSet
  6. How does a HashSet check for repetitions
  7. The underlying implementation of HashMap
  8. Why is the length of a HashMap a power of 2
  9. HashMap multithreading causes an infinite loop
  10. ConcurrentHashMap and Hashtable
  11. ConcurrentHashMap Thread-safe implementation/low-level implementation
  12. Comparable and Comparator
  13. Summary of the underlying data structure of the collection framework
  14. How to choose a set?

Java collection answer parsing

multithreading

  1. What are threads and processes?

  2. Please briefly describe the relationship between threads and processes, their differences and advantages and disadvantages.

  3. What’s the difference between concurrency and parallelism?

  4. Why multithreading?

  5. What are the possible problems with using multithreading?

  6. What about the life cycle and state of threads?

  7. What is context switching?

  8. What is a thread deadlock? How do I avoid deadlocks?

  9. What are the differences and similarities between sleep() and Wait ()?

  10. Why do we call the run() method when we call the start() method, and why can’t we call the run() method directly

  11. Method?

  12. Talk about what you know about synchronized

  13. Describe how you use the synchronized keyword. Did you use it in your project

  14. There are three main ways to use the synchronized keyword

  15. Talk about the underlying principles of synchronized

  16. Describe the underlying optimization of synchronized keyword after JDK1.6. Can you introduce these optimization in detail

  17. Talk about the difference between synchronized and ReentrantLock

  18. Let’s talk about the Java memory model

  19. Talk about the difference between the synchronized keyword and the volatile keyword

  20. ThreadLocal principle and ThreadLocal memory leakage problem

  21. Implement the difference between Runnable interface and Callable interface

  22. What is the difference between the execute() method and the submit() method?

  23. Analysis of thread pool principle

  24. Can you give me a brief introduction to the AtomicInteger class

  25. AQS principle analysis access: pay attention to the end of the public account

    Multithreaded answer analysis

JVM

  1. Introducing the Java memory area (runtime data area)
  2. Talk about the Java object creation process
  3. What are the two ways in which objects can be accessed?
  4. Let’s talk about the basic strategy for allocating objects in heap memory
  5. What’s the difference between the Minor AND Full Gc?
  6. How do I determine if an object is dead? (Two methods)
  7. A brief introduction to strong references, soft references, weak references, virtual references
  8. How to determine if a constant is discarded?
  9. How do you tell if a class is useless?
  10. What are the algorithms for garbage collection and their characteristics?
  11. Why HotSpot is divided into new generation and old generation?
  12. What are the common garbage collectors?
  13. Class loading process

JVM interview question answer analysis

network

  1. OSI and TCP/IP each layer structure and function, what are the protocols?
  2. TCP Three handshakes and four waves (frequent interviewers)
  3. TCP and UDP are different
  4. How does TCP ensure reliable transmission
  5. ARQ protocol
  6. Sliding Windows and flow control
  7. Congestion control
  8. Ijk how to display the home page by typing the URL in the browser (frequent interviewer)
  9. Status code
  10. The relationship between various protocols and the HTTP protocol
  11. HTTP long connection, short connection
  12. HTTP is a protocol that does not save state. How to save user state?
  13. What does a Cookie do? How is it different from Session?
  14. What are the main differences between HTTP 1.0 and HTTP 1.1?
  15. What’s the difference between URI and URL?
  16. What’s the difference between HTTP and HTTPS?

Network interview questions answer analysis

The data structure

  1. Queue in the Java Collection framework
  2. HashSet and TreeSet underlying data structures
  3. List of common implementation classes ArrayList and LinkedList source learning
  4. Map
  5. Binary tree
  6. Complete binary tree
  7. Full binary tree
  8. The heap
  9. Binary Search tree (BST)
  10. Self-balancing Binary Search Tree
  11. Red and black tree
  12. B minus, B plus, B star tree
  13. LSM tree

Data structure answer parsing

algorithm

  1. A few common string algorithm summary
  2. Longest public prefix
  3. Palindrome string
  4. The two together
  5. Reverse a linked list
  6. The KTH last node in a linked list
  7. Deletes the penultimate node of the linked list
  8. Merges two sorted lists
  9. Reference to part of the offer programming questions
  10. Step jumping problem
  11. Abnormal jump step problem
  12. Two-dimensional array lookup
  13. Replace the blank.
  14. A number raised to an integer power
  15. Reorder the array so that the odd number precedes the even number
  16. The KTH last node in a linked list
  17. Reverse a linked list
  18. Merges two sorted lists
  19. Implement queues with two stacks
  20. Stack push in, pop-up sequence

Algorithm Example answer parsing

The database

  1. MySQL Storage Engine
  2. Character set and proofreading rules
  3. The index
  4. Query the use of cache
  5. What is a transaction?
  6. Four properties of things (ACID)
  7. What are the problems associated with concurrent transactions?
  8. What are the transaction isolation levels? What is the default isolation level for MySQL?
  9. Locking mechanism and InnoDB locking algorithm
  10. Big table optimization
  11. Explain what the pooling design idea is. What is database connection pooling? Why do YOU need a database connection pool?
  12. How to deal with the id primary key after the database is divided into tables?
  13. How does an SQL statement execute in MySQL
  14. Recommended specifications for MySQL high-performance optimization
  15. What are the reasons why an SQL statement executes slowly?

MySQL database

Redis

  1. Why redis/ why cache
  2. Why redis and not Map/Guava?
  3. Redis thread model
  4. The difference between Redis and memcached
  5. Redis common data structure and application scenario analysis
  6. Redis sets the expiration time
  7. Redis memory flushing mechanism (MySQL has 2000W data, redis only 20W data, how to ensure that redis data is hot data?)
  8. Redis persistence mechanism (how to ensure that redis hangs and then restarts data can be recovered)
  9. Redis transactions
  10. Cache avalanche and cache penetration solutions
  11. How to solve the Redis concurrent competing Key problem
  12. How to ensure data consistency between the cache and the database in dual write?

Redis

Spring

  1. What is the Spring Framework?
  2. Name some important Spring modules?
  3. @RestController vs @Controller
  4. Talk about Spring IoC and AOP
  5. What are the scopes of beans in Spring?
  6. Do you understand the thread-safety issues of singleton beans in Spring?
  7. What’s the difference between @Component and @Bean?
  8. What are the annotations that declare a class as a Spring bean?
  9. Bean life cycle in Spring?
  10. Do you know how SpringMVC works?
  11. What design patterns are used in the Spring framework?
  12. What are the isolation levels in Spring transactions?
  13. What kinds of transaction propagation behavior do Spring transactions have?
  14. The @transactional (rollbackFor = exception.class) annotation.
  15. How do I use JPA to nonpersist a field in a database?

Spring interview

MyBatis

  1. What is the difference between {} and ${}?

  2. Xml mapping file, in addition to the common select | insert | updae | delete tags, what other tags?
  3. As a best practice, an Xml mapping file is usually written with a Dao interface. How does this Dao interface work? Can methods in the Dao interface be overloaded if their parameters are different?
  4. How does Mybatis paginate? How does paging plug-ins work?
  5. Brief introduction of Mybatis plug-in operation principle, and how to write a plug-in.
  6. Mybatis performs batch insert, can return database primary key list?
  7. What does Mybatis dynamic SQL do? What is the dynamic SQL? Can you briefly explain how dynamic SQL is executed?
  8. How does Mybatis encapsulate SQL execution results as target objects and return them? What are the mappings?
  9. Can Mybatis perform one to one, one to many associated query? What are the implementation methods and the differences between them?
  10. Does Mybatis support lazy loading? If so, how does it work?
  11. In the Xml mapping files of Mybatis, can the IDS of different Xml mapping files be repeated?
  12. How to perform batch processing in Mybatis?
  13. What Executor executors does Mybatis have? What’s the difference between them?
  14. How to specify which Executor Executor to use in Mybatis?
  15. Can Mybatis map Enum classes?
  16. In Mybatis mapping file, if tag A refers to tag B by include, can tag B be defined after tag A, or must be defined before tag A?
  17. Describe the mapping between Mybatis Xml mapping file and Mybatis internal data structure.
  18. Mybatis semi-automatic ORM mapping tool What’s the difference between it and automatic?

MyBatis

Kafka

  1. What is Kafka? What are the main application scenarios?
  2. What is Kafka’s advantage over other message queues?
  3. Is the queue model understood? Is Kafka’s message model known?
  4. What are Producer, Consumer, Broker, Topic, Partition?
  5. Kafka has multiple copies. What benefits did it bring?
  6. Zookeeper in Kafka?
  7. How does Kafka guarantee the order in which messages are consumed?
  8. How does Kafka ensure that messages are not lost
  9. How does Kafka ensure that messages are not consumed twice

image

Kafka

Netty

  1. What is Netty?
  2. Why use Netty?
  3. Are you familiar with Netty application scenarios?
  4. What are the Netty core components? What are the roles of the two?
  5. EventloopGroup? What does it have to do with EventLoop?
  6. Bootstrap and ServerBootstrap?
  7. How many threads does the NioEventLoopGroup default constructor start?
  8. The Netty thread model?
  9. How do I start the Netty server and client?
  10. What is TCP sticky/unpack? What’s the solution?
  11. What is the Netty long connection and heartbeat mechanism?
  12. Netty zero copy.

Netty答案解析

Space is limited. There are more about distributed, micro services, high availability, high concurrency, etc., not shown, you can directly obtain the original file to view, learn. I hope I can help more friends.

How to obtain: pay attention to the public account at the end of the article

Big factory interview real question analysis

The last

In fact, Java development knowledge is so much, the interview to ask or so things. So there are no other tips for interviews, just how prepared you are for them. So, when you go out for the interview, find out where you are in your revision.

Tencent, headlines, ali, share above Meituan companies such as beating, bytes in 2019-2020 high frequency interview questions, LZ has put together a video these technical points and PDF (actually spent a lot of energy more than expected), contains the knowledge context + details, as space is limited, the above is just one part in the form of pictures to show you. There are more about distributed, micro services, high availability, high concurrency, etc., not shown, you can directly obtain the original file to view, learn. I hope I can help more friends.

How to obtain: follow the public account below to obtain.