The latest sharing of Tencent (Java senior post) in 2021: 180 real interview questions!

è¾è®¯Javaé «çº§å²180éé ¢ è¯çé ¢ ï¼é ¢ è¯å¤§åæ¿45Koffer没é®é ¢ ï¼

1. Data structure and algorithm foundation

  1. · Talk about several common sorting algorithms and their respective complexity.
  2. · Write a bubble sorting algorithm in Java
  3. · Describe the chain storage structure.
  4. · How to traverse a binary tree?
  5. · Invert a LinkedList.
  6. · Use Java to write a recursive traversal of all files under the directory.

Two, Java basics

  1. · What is the difference between an interface and an abstract class?
  2. · What are the types of exceptions in Java? How to use each?
  3. · What are the commonly used collection classes? For example, how to sort List?
  4. · How about the internal implementation of ArrayList and LinkedList? The difference between them and their advantages and disadvantages?
  5. · What is the memory overflow? Please give an example?
  6. · What is the difference between == and equals?
  7. · What does the hashCode method do?
  8. · What is NIO? What kind of scenario is it suitable for?
  9. · HashMap implementation principle, how to ensure the thread safety of HashMap?
  10. · JVM memory structure, why do we need GC?
  11. · NIO model, the difference between select/epoll, the principle of multiplexing
  12. · How many bytes a character occupies in Java, and then ask how many bytes int, long, double occupies
  13. · What are the ways to create an instance of a class?
  14. · The difference between final/finally/finalize?
  15. · The difference between Session/Cookie?
  16. · The difference between String/StringBuffer/StringBuilder, extensions ask their implementation?
  17. · Servlet life cycle?
  18. · How to allocate a continuous 1G memory space with Java? What needs attention?
  19. · Java has its own memory recovery mechanism, but why is there still a memory leak problem?
  20. · What is java serialization and how to implement java serialization? (write an example)?
  21. · String s = new String("abc"); How many String Objects have been created?

Three, JVM

  1. · The basic structure of the JVM heap.
  2. · What are the garbage algorithms of JVM? The basic process of CMS garbage collection?
  3. · What are the common startup parameters of JVM that can be adjusted, and how many are described?
  4. · How to check the memory usage of JVM?
  5. · Will Java programs overflow or leak? Give a few examples.
  6. · What are your commonly used JVM configuration and tuning parameters? What is the role of each?
  7. · JVM memory structure?
  8. · Commonly used GC strategy, when will YGC be triggered, and when will FGC be triggered?

Four, multithreading/concurrency

  1. · How to create threads? How to ensure thread safety?
  2. · How to implement a thread-safe data structure
  3. · How to avoid deadlock
  4. · What is the role of Volatile keywords?
  5. · What should I pay attention to when using HashMap in a multi-threaded environment? why?
  6. · Do you use run or start to start a thread in a Java program?
  7. · What is a daemon thread? What is the use?
  8. · What is a deadlock? How to avoid
  9. · What is the difference between threads and processes?
  10. · How is Threadlocal implemented in Java?
  11. · What is the realization principle of ConcurrentHashMap?
  12. · The difference between sleep and wait
  13. · The difference between notify and notifyAll
  14. · The role of the volatile keyword
  15. · The role and implementation of ThreadLocal
  16. · How two threads execute serially
  17. · What is the meaning of context switching
  18. · Can a thread be killed at runtime?
  19. · What are conditional locks, read-write locks, spin locks, and reentrant locks?
  20. · The realization principle of the thread pool ThreadPoolExecutor?

Five, Linux use and problem analysis and troubleshooting

  1. · Use two commands to create a file?
  2. · What is the difference between a hard link and a soft link?
  3. · What are the commonly used Linux commands?
  4. · How to see the resource consumption of a Java thread?
  5. · What are the possibilities for too high Load?
  6. · What does the /etc/hosts file do?
  7. · How to quickly replace all "abc" in a text with "xyz"?
  8. · How to search the log file to find the error log?
  9. · Found that the disk space is not enough, how to quickly find the file that takes up the largest space?
  10. · Java server troubleshooting (OOM, high CPU, high load, class conflicts)
  11. · Java troubleshooting tools and usage (top, iostat, vmstat, sar, tcpdump, jvisualvm, jmap, jconsole)
  12. · How to analyze the Thread dump file (Runnable, lock, code stack, operating system thread ID correlation)
  13. · How to view thread information of Java applications?

Six, frame use

  1. · Describe the three states of Hibernate?
  2. · Bean life cycle in Spring.
  3. · SpringMVC or Struts process request processing.
  4. · What problem does Spring AOP solve? How did it happen?
  5. · What is the propagation property of Spring transaction? What will it affect?
  6. · What is the difference between BeanFactory and FactoryBean in Spring?
  7. · What is the principle of IOC in the Spring framework?
  8. · What are the ways of dependency injection in spring?
  9. · Struts workflow
  10. · How to implement an aspect with Spring?
  11. · How does Spring implement database transactions?
  12. · Hibernate's use of primary and secondary caches, Lazy-Load understanding;
  13. · How does mybatis realize batch submission?

Seven, database related

  1. · What are the characteristics of MySQL InnoDB and Mysaim?
  2. · What is the difference between optimistic locking and pessimistic locking?
  3. · What is the database isolation level? what's the effect?
  4. · The basic principle of MySQL master-slave synchronization.
  5. · Select * from table t where size> 10 group by size order by size SQL statement execution order?
  6. · How to optimize database performance (index, sub-database sub-table, batch operation, paging algorithm, upgrade hard disk SSD, business optimization, master-slave deployment)
  7. · SQL under what circumstances will not use the index (exclude, not equal to, function)
  8. · What field is generally indexed on (the field with the most filtered data)
  9. · How to find all rows whose name field does not contain "XYZ" from a table?
  10. · MySQL, B+ index implementation, row lock implementation, SQL optimization
  11. · Redis, RDB and AOF, how to make high availability, cluster
  12. · How to solve the problem of high concurrency and inventory reduction
  13. · Implementation mechanism of indexes in mysql storage engine;
  14. · Several granularities of database transactions;
  15. · Row locks, table locks; optimistic locks, pessimistic locks

Eight, network protocol and network programming

  1. · The process of TCP establishing a connection.
  2. · The process of TCP disconnection.
  3. · The logic behind the browser's 302 jump?
  4. · The interactive process of HTTP protocol. What is the difference between HTTP and HTTPS, and how does SSL interact?
  5. · What is the relationship between Rest and Http? Everyone says that Rest is very lightweight, how do you understand Rest's style?
  6. · What is the use of TCP's sliding window protocol? Talk about the principle.
  7. · What are the methods of HTTP protocol?
  8. · What is the difference between a switch and a router?
  9. · The basic process of Socket interaction?
  10. · Protocol (message structure, resumable transmission, multi-threaded download, what is a long connection)
  11. · Tcp protocol (connection establishment process, slow start, sliding window, seven-layer model)
  12. · Webservice protocol (wsdl/soap format, the difference from rest protocol)
  13. · The benefits of NIO, Netty threading model, what is zero copy

Nine, Redis and other caching systems/middleware/NoSQL/consistent Hash, etc.

  1. · Enumerate a commonly used Redis client concurrency model.
  2. · How does HBase implement fuzzy query?
  3. · Enumerate a commonly used message middleware, how to realize the order if the message is to be preserved?
  4. · How to implement a Hashtable? How does your design consider Hash conflicts? How to optimize?
  5. · Distributed cache, consistent hash
  6. · LRU algorithm, slab allocation, how to reduce memory fragmentation
  7. · How to solve the problem of caching single-machine hotspots
  8. · What is a Bloom filter, and its realization principle? What does False positive mean?
  9. · The difference between memcache and redis
  10. · What are the functions of zookeeper and how is the election algorithm performed?
  11. · Map/reduce process, how to use map/reduce to achieve joint statistics of two data sources

10. Design patterns and refactoring

  1. · Can you give examples of a few common design patterns
  2. · What principles will you follow when designing a factory package?
  3. · Can you list an open source project/library that uses the Visitor/Decorator model?
  4. · What are your most commonly used design patterns when coding? In what scenario is it used?
  5. · How to implement a singleton?
  6. · Agent mode (dynamic agent)
  7. · Singleton mode (lazy man mode, bad man mode, how to solve concurrent initialization, the use of volatile and lock)
  8. · What are the design patterns in the JDK source code that impress you? Take a look at an example?

Eleven: Microservices

1. What is a microservice?

2. How to communicate independently between microservices

3. What are the differences between springCloud and dubbo?

4. Springboot and springcloud, would you please talk about your understanding of them?

5. What is a microservice circuit breaker? What is service degradation?

6. What are the advantages and disadvantages of microservices? Talk about the pits you encountered in project development

7. What are the microservice technology stacks you know? Please list one or two

8. Both eureka and zookeeper can provide service registration and discovery functions, please tell us the difference between the two?

I believe you may have experienced these:

I have been working for two or three years, and each project will work overtime and go all out to complete, but the salary increase is not satisfactory.

I heard that the old colleague who left after the new year just got a high-paying offer, and the annual salary went straight to 500,000.

Since the current company has no access to new technologies and is extremely anxious about its own market competitiveness, how will the future career path be taken?

In this bitter winter, you finally understand that there are few job opportunities now, and it is difficult to have a large increase in salary. The annual salary of Java engineers is determined by skills. It is time to improve skills and plan ahead for future career development paths.

As a Java engineer, you are already very busy with your work. How can you advance to achieve rapid growth?

Share some of the experiences of people who have come here for your reference.

Once you become a Java engineer, you are destined to learn for life.

What motivates you to keep learning? I list three points:

1. Keep adding value to yourself and have more choices

If you compare technology to a tree, every time you learn a language, you light up a fruit on the tree. The more you get, the more fruit of the technology tree, and the greater the value. When the fruits of the technology tree accumulate to a certain level, you will be able to advance to the high-level technical direction vertically, and your career development will take a step forward.

2. The Internet does not have a comfort zone, and if you stop moving, you are regressing

Computer technology is updated rapidly and new technologies are emerging in an endless stream. If you want to become an excellent Java engineer, you must be prepared to learn at any time and persevere in order to keep up with the rapid development of the Internet.

3. Learning is the best way to face competition and survive the mid-life crisis

Java engineer is a highly paid profession. With the rapid development of the Internet in recent years, it has once become a popular profession, so that more and more people are involved in this profession. Only by studying hard and becoming a mid-to-high-end Java engineer competing for high salaries by Internet companies can you not be afraid of the cold winter.

At present, the cold winter of the Internet has made many Internet people sober. Many large companies have laid off employees and contracted recruitment needs, mainly for the basic posts and the wave of people who boiled frogs in warm water. Mid-to-high-end Java engineers are still in short supply in the market.

Mainstream technology selection of Internet companies

Advanced Java, architects must learn 6 major skills, including: data structure and algorithms, advanced Java features, source code analysis, database, Java framework and necessary tools, system architecture design, etc., hoping to really help The programmer advances as a friend of advanced Java and architects.

1. Concurrent programming

Only through a thorough understanding of the underlying operating principles and strengthening of logical thinking can we write efficient and safe multi-threaded concurrent programs.

Just click on the portal ! !

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

2. Design pattern

Design patterns are the foundation of reusable object-oriented software. Learning design patterns is the only way for every Java engineer to advance. Flexible use of design patterns can make the code simpler, easier to understand, and more reusable. .

Click on the portal to receive the article data

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

3. R&D related framework tools

For Java programmers, the following frameworks and tools are often used. Workers who want to do well must first sharpen their tools, master and apply these tools proficiently, which can help us carry out our work more efficiently and with quality, such as debugging, efficient deduplication, code review, and so on.

Click on the portal​​​​​​​ to receive the article data

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

4. Distributed architecture

With the increase in the volume and importance of the business, the monolithic architecture model cannot correspond to large-scale application scenarios, and the system will never allow a single point of failure to cause the overall unavailability. Therefore, only the business system can be split vertically or horizontally to form a distributed system. Architecture to eliminate single points of failure, thereby increasing the availability of the entire system.

Including: Distributed Session, Distributed Cache, Database, Consistency, Load Balancing, Message Queuing (RabbitMQ, ZeroMQ, Kafka), etc.

Click on the portal​​​​​​​ to receive the article data

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

5. Microservices

Depending on time and local conditions, the benefits of choosing a microservice architecture will far outweigh the costs.

Small-scale enterprises can consider introducing appropriate microservice architectures, transforming existing systems or creating new microservice applications, and gradually accumulate experience in microservice architecture. Instead of implementing microservice architecture in a comprehensive manner, consider cost, efficiency, and practicability in a comprehensive manner.

Click on the portal​​​​​​​ to receive the article data

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

6. JVM performance optimization

Click on the portal​​​​​​​ to receive the article data

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

7. Data structure and algorithm

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

Finally, regardless of the workplace or life, there are certain obstacles and bottlenecks at each stage, which we all have to experience.

If you can recognize yourself and the stage you are at, think and recharge in a targeted manner, persist in doing the right thing, and put in more effort than others, you will be better than others and have more opportunities. This is the Matthew effect we often say: the harder you work, the luckier you are.

BAT interview real questions + structure technical data, improve software and hard capabilities, and get good offers with high salaries

Having said so much, how should I learn? Are there any materials or videos?

Dachang Java interview question bank, BAT architecture technical database, pay attention to the editor, and then click the portal to receive the article information! !

The content of the information covers BAT architecture technology and interview questions, reducing the time you spend searching for information everywhere, and the systematic practical technical knowledge makes it easier for you to interview and advance.

Java Interview Complete Book. Java core knowledge

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

 

Tencent Java senior post has 180 real interview questions, and it’s no problem to get 45 Koffer for the interview!

Guess you like

Origin blog.csdn.net/bieber007/article/details/115273494
Recommended