Memoirs of an Internet giant face test

Source: Internet
Author: User
Tags memcached redis volatile stringbuffer

Bo main work for more than 3 years, face several manufacturers, candidates for the post is a senior Java development Engineer, the following is a personal experience of some interview questions, recorded down, left to the people who need ~

First, Java Basics

1, the basic principle of hashmap, internal data structure, put operation of the whole process, whether thread safety and why? Jdk8 to HashMap what optimization.
2. Why the string class is immutable. The difference between StringBuilder and StringBuffer, string constant pool, stringbuffer why is thread safe. The underlying principle of the plus sign
3, reflection, accessible, the principle of dynamic agent, JDK dynamic agent and the difference between cglib and the implementation of their respective principles
4, automatic boxing, assignment operation, in the memory is how to achieve.
5. Differences between interfaces and abstract classes
6, the principle of concurrenthashmap, internal data structure, how to improve concurrency, jdk8 what to do in the optimization.
7, the principle of hashset
8, GC principle, generational mechanism, accessibility analysis
9, what kinds of JVM parameters, how to tune.
10. What are the characteristics of JMM?
11, what is the jump table.

Second, multithreading

1, the thread has several states. is how to switch between.
2, the role of volatile (two points), the principle of volatile and application scenarios.
3, what is thread safety. How to do thread safety. How to tell if a class is thread safe.
4, there are several ways to synchronize threads.
5, the principle of threadlocal
6, synchronized is how to achieve.
7. The difference between sleep and wait
8, the thread pool has several. Their respective application scenarios
9, the principle of the thread pool, there are several main parameters. What to do if the thread pool is full.
10, Semaphore, Countdownlatch, Futuretask
11, the difference between submit and execute.
12, several main methods of future interface
13. There are several ways to create threads
14. How to realize the re-entry lock

third, the database

1, MySQL indexing principle. Why is a B + tree. Have any advantages.
2. What kinds of transaction isolation level. The default isolation level for MySQL is. What is dirty reading, phantom reading, and non repeatable reading.
3, MVCC principle
4, MySQL has what kinds of locks.
5, the MySQL storage engine has what kinds. Differences and the respective applicable scenes.
6, Query cache configuration
7, ACID
8, how to optimize the slow query
9, the most left prefix matching principle, principle

Four, algorithm

1, the principle of consistent hashing
2, handwritten two-point search, fast sorting
3. Handwritten LRU algorithm
4, two linked list to find the intersection point
5, two infinitely long numbers sum
6, hand-written producer consumer Demo
7, 256M memory sorted 2G size files
8. To find the maximal sub sequence of the array

v. Operating system and computer network

1, how to find out from the access log the largest number of 10 IP. Do you understand the awk statement.
2, Jstack,jstat,jmap,jheap command to understand, how to use.
3, the system load situation how to view.
4, Network layered protocol understand.
5, TCP three handshake, four times waved to understand it.
6, the difference of Aio,bio,nio
7, the difference of select,poll,epoll.
8. What are the IO models?

Vi. Open Source framework and Components

This part is mainly based on the resume and the actual situation of the project to ask.
1. Do you know about spring? ioc,aop,transaction annotation
2, Spingmvc understand it.
3, the difference between Redis and memcache
4, Redis Persistence strategy, the difference between RDB and AOF and the application scene
5, memcached memory is how to allocate. Consistent hashing principle
6, MQ principle and application scenario, MQ is how to guarantee not to lose the message.
7, Tomcat principle, the main use of which design patterns.
8, the Redis and memcached memory is how to reclaim respectively.
9, Guava cache is how to achieve.

vii. scene design and architecture

1, seconds kill scene, how to do technology selection.
2, the design of a high concurrency support services, write the core code
3, high concurrency and high availability how to achieve.
4, service downgrade how to do. Current limit, speed limit, timeout retry, fuse, self recovery, and how to implement separately.
5, what is the micro-service. What is the benefit. Why would you do that?
6, Cap theory is what. Which scenarios in the project used the CAP theory.
7. What is base theory?
8. When should you use MQ?

Viii. Other

1, usually through what way to learn technology.
2, a recent study of a knowledge point is what.
3, have any experience with people.
4. What is one of the most familiar projects?
5, when job-hopping, what do you value most.
6, why job-hopping. Why we choose our company.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.