Preface:

These questions were asked by netizens when they went to interview with first-tier Internet companies such as Ali, Baidu, Xiaomi, LeEco, Meituan, 58, Sina and Sohu. Familiarity with the points listed in this article will greatly increase your chances of passing the first two rounds of technical interviews. I hope this will help you and wish you a successful job search.

Java based

1Three features of the Java language

2. Main Features of Java language

3. What is the difference between JDK and JRE

4.Java basic data types and their enclosing classes

5. What if the main method is declared private?

Public static void main(String argsQ]) public static void main(String argsQ]

== == 7

8. What are the common methods of Object

Why are there no global variables in Java?

10. What’s the difference between a while loop and a do loop?

11. Can a char variable store a Chinese character? Why is that?

12. Public, private, protected differences, inheritance methods and access rights

13. Float f = 3.4; Is that correct?

14.shorts1 = 1; s1 = s1 + 1; Didn’t you? shorts1 = 1; s1 += 1; Is wrong?

15.8 Difference between u and &:&?

16.IntegerCache

17. What is the Locale class?

Final.final.finalize in Java

19. Difference between hashCode0 and equals0

20. What is the difference between a deep copy and a shallow copy?

What are the classes for manipulating strings in Java? What’s the difference between them?

22.String STR = “a” and String STR =new String(“a”)- same?

23. Can abstract classes use final modifications?

24. Static keyword 5

25. The difference between Overload and Override. Can overloaded methods be differentiated by return type?

26. Four references to Java

27. What is the difference between a Comparator and Comparable in Java?

28. Java serialization, deserialization?

29. When is Java serialization needed?

30. Implementation of serialization?

31. What if some data does not want to be serialized?

Sorted out the Java architecture learning materials, learning technology content includes: Spring, Dubbo, MyBatis, RPC, source code analysis, high concurrency, high performance, distributed, performance optimization, micro services advanced architecture development and so on.

Friends in need can click:This point! This point!, code word: J j.

IO&NIO

1. What is I0 stream?

How many types of flows are there in Java?

3. Which is better, byte stream or character stream? How to choose?

4. The reading speed of files with a large amount of data is slow. How to select streams?

5.1 How many O models are there?

6. Blocking 1O (blocking 10)

7. Non-blocking I/O (nonblocking 10)

I/O multiplexing model (I0 multiplexing)

9. Signal driven I/O model

10. Asynchronous /O(Asynchronous 10)

11. The difference between NIO and 10?

12. Application scenarios of NIO and IO

13.NIO core components

14. What is channel

15. Which channel implementation is most commonly used in Java NIO?

What is a Buffer?

Multithreaded interview questions

1. What is process?

2. What are threads?

3. Thread implementation?

4. What is the difference between the start0 and run0 methods in Thread?

5. Thread NEW status

6. The thread status is RUNNABLE

7. RUNNING status of the thread

8. The thread is BLOCKED

9. The thread TERMINATED state

10. Thread state transition diagram

11. I — Exception with system.out.printin0

12. How do I know which thread is calling the code snippet?

13. Thread activity status?

14. Sleep0 method

15. How to gracefully set bedtime?

16. Stop the thread

17. Interrupted and isInterrupted

18.yield

19. Thread priority

20. Priority inheritance feature

21. Who runs faster?

22. Thread types

23. Daemon thread characteristics

24. A typical daemon thread in Java

25. How do I set up the daemon thread

Does the finally block in the Daemon thread execute when the Java VIRTUAL machine exits?

26. Set the thread context classloader

27.join

28. What is synchronized?

29. What two important JVM instructions do synchronized include?

30. Synchronized?

31. What does synchronized lock?

32. A Java object

There are many more. I won’t give you an example here

JVM

1JDK. JRE, JVM?

2. How does the launcher see which classes are loaded, and in what order? ‘

  1. The 10 main components of a class bytecode file?

4. Draw the JVM memory structure map.

5. Program counter

6Java virtual machine stack

7. Local method stack

8 the Java heap

9. The method of area

10. Runtime constant pool?

11. When to throw StackOverflowError?

12. What is the difference between Java7 and Java8 in the memory model?

13. What are the two memory areas that programmers care about most?

14. What is direct memory?

15. OutOfMeoryError occurs in all run-time areas of VM memory except in which area?

16. When can a heap overflow occur?

17 How to implement a heap overflow?

18. When does a space throw an OutOfMemoryError?

19. How to implement StrackOverflowError?

20. How do I set the direct memory capacity?

21.Java heap memory composition?

  1. Edem: from: to The default ratio is?

23. Garbage marking stage?

24. Reference counting?

25. Root search algorithm?

26. Three common garbage collection algorithms in the JVM?

27. Mark-erase algorithm?

28. Copy algorithm?

29. Mark-decluttering algorithm?

30. Generational collection algorithm?

31. Garbage collector?

32.Stop The World?

Mysql

What is a database?

2. How do I view the syntax of an operation?

3. What are the storage engines for MySql?

4. What are the two common storage engines?

6. Can the engine be set for tables? How do I set it?

6. Select an appropriate storage engine.

7. Select the appropriate data type

8.char & varchar

9. Mysql | character set

10. How to select a character set?

What is an index?

12. Index design principles?

What are the index 13. Mysql |?

14. Underlying implementation principles of Hash index and B+ tree index:

15. Non-clustered index – will the table be queried?

16. How do I query the last row?

17.MySQL self-added ids are not consecutive.

18. Sq injection problem?

19. What is the 3NF paradigm?

  1. NULL and empty string judgment?

21. What is a transaction?

22. Transaction 4 features?

23. What are the transaction isolation levels?

InnoDB default transaction isolation level? How do I view the current isolation level

What is a lock?

26. The deadlock?

27. How do I handle deadlocks?

28. How do I create a user? Authorization?

29. How do I view the table structure?

30. How many ways can Mysq drop tables? The difference between them?

31. Do you like to go to the index?

Spring

1. The Spring framework?

2. The overall architecture of Spring?

3. What can Spring do?

What are the advantages of Spring? Weaknesses?

5. Can you name a few new features of Spring5?

6.IOC?

7. What is dependency injection?

8. What are the ways of IOC injection?

9.10 C advantages? Weaknesses?

10. Bean life cycle?

11. How many ways can Spring be configured?

12. How many scopes do beans in Spring have?

13. What is AOP(faceted Programming)?

14. How many types of notifications are there on a slice? Is respectively?

15. What is a Join point?

16. What is a Pointcut?

What is an Aspect?

18. Weave (has)?

19. Introduction?

20. Are there multiple points in the target object’s life cycle that can be woven into?

AOP dynamic proxy strategy?

22. What is an MVC framework?

23. What is SpringMVC?

24. The core of SpringMVC?

25. How many components of SpringMVC?

26.SpringMVC workflow?

27. Advantages of SpringMVC?

28. Are singleton beans thread-safe?

29. From what two perspectives does Spring implement autowiring?

30. How many ways are there for automatic assembly? Is respectively?

31. How many annotations declare beans?

Mybatis

1. What is Mybatis?

2. The advantages of Hibernate?

3. Hibernate weaknesses?

4. Mybatis advantages?

5. Mybatis weaknesses?

6. When to use Mybatis?

7. What are the core components of Mybatis? Is respectively?

8. What is the difference between #0 and $0?

9. What are the 9 dynamic tags in Mybatis?

What is the difference between #0 and $0

10. What are the tags in the XML mapping file?

11. Does Mybatis support annotations? Advantages? Weaknesses?

12. Mybatis dynamic sq |?

13. What is the principle of paging broadcast in Mybatis?

14. How to obtain the autoincrement primary key?

15. Why Mapper interface has no implementation class, but can be called normally?

16. Is annotation better or XML better?

17. If you do not want to manually specify an alias, how to use a hump to automatically map?

18. What if the entity attribute name is inconsistent with the field in the table?

19. What tags do you use for nested queries?

20. Like fuzzy query how to write?

21. Does Mybatis support enumeration?

22. The SqlSessionFactoryBuilder is life cycle?

23.- Level cache structure? How do I enable level 1 cache? How do I not use level 1 cache?

24. How to configure level 2 cache?

25. Describe the operation principle of Mybatis plug-in, and how to write a plug-in?

26. What are the reclamation strategies for level 2 cache?

27. Can ID be repeated in Mybatis Xml file?

28. With Mybatis, which cache framework is better used in Java framework? What are the characteristics?

Redis

1. What is Redis?

2. Redis feature?

3. Suitable application scenarios for Redis?

4. Besides Redis, what other NoSQL databases do you know?

5. The difference between Redis and Memcache?

6. How many data types does Redis have?

7. What are the advanced features of Redis?

8. Have you ever installed Redis?

9. How many major executables are there in Redis? Is respectively?

10. How many ways can I start Redis?

11.Redis configuration needs to be written? How to configure it?

12. How to execute Redis client commands?

13. How do I stop the Redis service?

14. How do I check whether the current key exists?

15. How do I delete data?

16. Why is Redis fast? Single thread?

17. What is the maximum value of a string?

18. How many databases does Redis have by default?

19. How many ways to persist Redis?

20.RDB persistence?

21. How is persistence of the RDB triggered?

22. What are the advantages of RDB?

23. Disadvantages of RDB?

24. How do I disable persistence?

25.AOF Persistence?

26. How do I check whether AOF is enabled?

27 How do I enable AOF?

28.AOF workflow?

29. Why does AOF append commands to the cache (AOF _buf) first?

30. How is AOF persistence triggered?

31. AOF advantages?

32. AOF weaknesses?

SpringBoot

1. What is SpringBoot?

2.SpringBoot features?

3. How to quickly build a SpringBoot project?

4.SpringBoot boot class annotations? What annotations does it consist of?

5. What is YAML?

6. Which configuration file formats does SpringBoot support?

7.SpringBoot boot mode?

8.SpringBoot needs a separate container to run?

9.SpringBoot configuration path?

10. Application. The properties and application. Yml file location can be put on? Priority?

11.SpringBoot automatic configuration principle?

12.SpringBoot hot deployment mode?

13. The bootstrap. Yml and application. Yml?

14. How does SpringBoot change the port number?

15. How can I enable the SpringBoot feature?

16. How is SpringBoot compatible with Spring projects?

17.SpringBoot configuration monitoring?

18. Which endpoint to visit for Bean assembly report information?

19. Which endpoint is closed for application access?

20. Which endpoint is visited to view published application information?

21. How many combined annotations for the requested access?

22. The starter in the SpringBoot?

23. Mybatis SpringBoot integration?

24. What are SpringProfiles?

25. Configuration files for different environments?

26. How do I activate an environment configuration?

Annotate test cases?

SpringBoot exception handling notes?

29.SpringBoot 1.x and 2.x differences….

30.SpringBoot reads configuration related annotations.

SpringCloud

1. What is SpringCloud?

2. What are microservices?

3. What are the characteristics of SpringCloud?

4.SpringCloud core components?

5. What protocol is SpringCloud based on?

6. What’s the difference between SpringCloud and Dubbo?

7. What is Eureka?

8. The fundamental role of service governance?

9. What is service renewal?

10. What is offline service?

11. What is failure culling?

12. What is the self-protection mechanism?

What is the Ribbon?

14. What is the annotation for load balancing in the Ribbon?

15. What are the load balancing strategies in the Ribbon?

16. What is service circuit breaker?

17. What is service degradation?

18. What is Hystrix?

19. What are the functions of Hystrix?

20.Hystrix encapsulates remote calls to?

21. Notes for initiating fuse downgrading service?

22. What is Feign?

23. Feign advantages?

24. What is Config?

23.. Feign advantages?

25. Two roles in the Config component?

26. What is Zuul?

27. Advantages of using Zuul?

28. What is the core of Zuul?

29. How many filter types does Zuul have? Is respectively?

30. What is Sleuth?

31. What work has Sleuth helped us do?

Kafka

1. What is Kafka?

2. What are the three key features of Kafka?

3. Kafka is generally used in two broad categories of applications?

4. Kafka feature?

Kafka’s five core apis?

6. What is a Broker?

What is a Producer?

8. What is a Consumer?

9.什么是Topic (主题) ?

What is a Partition?

11. Relationship between partition and proxy node?

12. What is Replication?

What is a Record?

14. What scenarios does Kafka fit into?

15. Kafka disk selection on?

16. Advantages of using RAID?

17. How many factors should be considered when planning disk capacity?

18.Broker using a single? Multiple file directory path parameters?

19.- In general, which parameter is selected to configure the path? Benefits?

20. What are the parameters for automatically creating topics?

21 Solve the Kafka message loss problem?

22. How do I customize a zone policy?

23. Where can kafka compress messages occur?

Kafka message duplication problem?

25. What do you know about kafka monitoring tools?

Answers to interview questions

Well, everyone, that’s the end of this article! As to why the answers to the interview questions are not written directly, I would say that writing the interview questions down makes the essay very long. This will affect the readability of the article.

More than 400 pages of Java interview questions have been organized into topics. There are also 283 pages of core Java knowledge PDF.

Friends in need can click:This point! This point!, code word: J j.

Finally, I wish you all success in the interview and get the offer of your favorite company