70 Ali Java interview questions Baidu frequency (frame + the JVM algorithm + + + multithreaded database)

Foundation and framework

1.String class can inherit it, and why

2.String, Stringbuffer, the difference between the StringBuilder?

What is the difference 3.ArrayList and LinkedList

4. Examples of sequence type, such as static data parent class constructors, fields, static data subclass, constructors, fields and their order of execution

5. What used Map, what's the difference, HashMap is thread-safe for you, what is the use of concurrent Map are and what they are internal principle, such hashcode, expansion, etc.

6.HashMap Why get and set so fast, why can improve concurrency concurrentHashMap

7. The difference between the abstract class and interface, the class can inherit more than one class it, what interfaces can inherit multiple interfaces, classes can implement multiple interfaces it

Stack memory overflow will occur 8. what circumstances

9. What is nio, principle

10. The reflection, Class.forName difference and ClassLoader

11.tomcat structure, process class loader

12. talk about Spring transaction propagation properties, the difference between AOP principle, dynamic agent and cglib implementation, which has several AOP implementations

The difference 13.Spring of beanFactory and factoryBean

14.Spring loading process

15.Spring how to manage the affairs of

v2-504f4b6962058518699aa64ce4a4b044_hd.png

Multithreading

1. The maximum number of threads to determine what line according to city

2. Several multi-threaded implementation, what is thread-safe, what is reordering

3.volatile principle, effect, can lock it in place

Difference 4.sleep and wait, and wait realization of the principle of

The difference 5.Lock and synchronized, synchronized principle, what is the spin locks, lock bias, lightweight lock, what is reentrant lock, what is fair and unfair lock lock

6. What type atomic used, what are their parameters and principles

7. What are the thread pool used, under the principle of their brief summary, the meaning of each argument constructor, such coreSize, maxsize, etc.

8. There is a third party interface, there are many threads to call to get data, now up to 10 per regulations threads simultaneously call it, how to do it.

9.spring the controller is a single case or multiple cases, how to ensure the safety of concurrent

10. Use three threads sequentially three letters abc print cycle, such abcabcabc

11.ThreadLocal used it, what the principle is, use the time to pay attention to what

12. If you could achieve a secure concurrent list, how would you do

v2-4999d9141fd426facf4f9c3e4592fce4_hd.png

JVM-related

1.jvm in a full GC process (from ygc to fgc) what, will talk about how the object was promoted to the old era, several major jvm parameters

2. Do you know what kinds of garbage collectors, their advantages and disadvantages, highlight some of the lower cms

3. When a memory overflow, how do you debug

Knowledge 4.JVM know how much memory model

5. Tell me what you know about a simple class loader

6.JAVA of reflection

The internet

What is the difference 1.http1.0 and http1.1

2.TCP three-way handshake and four waving process, why the disconnect to 4 times, if only to shake hands twice, what will

The difference 3.TIME_WAIT and CLOSE_WAIT

4. Tell me what you know several HTTP response code

5. When you open a link in a browser, the computer what had been done step

There are several under 6.Linux IO model, what is the meaning of each

7.TCP / IP how to ensure the reliability of data packets which make up

8. architecture and distributed:

Meaning 9.tomcat how to tune various parameters

10. What are the common caching strategy you used in the project what the caching system, how to design, Redis is used to pay attention to what, persistent way, memory settings, cluster, out strategies

11. How to prevent caching avalanche

12. implemented by a java own LRU

13. How do distributed cluster under a unique serial number

14. Design a spike system for 30 minutes without payment will automatically close the transaction

15. How to do a distributed lock

16. What MQ used, how to use, and other mq compare what advantages and disadvantages, MQ connection it is thread-safe

How to ensure data is not lost 17.MQ system

18. The principle of distributed transactions, how to use distributed transactions

19. What is the consistency of hash

20. What is restful, talk about your understanding of restful

21. How to design build and maintain long-100w connection?

22. Explain what MESI protocol (cache coherency)

23. Several HASH algorithm to talk about, you know, can be a simple

24. What is paxos algorithm

Difference 25.redis and memcached memory management

26. an online documentation system, documents can be edited, how to prevent multiple people to edit the same document update

v2-3e6c5918ad33e3a00f4742f7b034822a_hd.png

algorithm

1,10 one hundred million numbers in which to find a minimum of 10

2, there are 100 million numbers, of which two are duplicates, find it quickly, time and space to be the best

3,2 one hundred million randomly generated integer disorder, to find out the value of intermediate size

4, the binary tree traversal

database

1. What are the database isolation level, what their meaning is, MYsql default isolation level is what it is, the advantages and disadvantages of each storage engine

2. under high concurrency, how to do safe modify the same row of data, and what optimistic and pessimistic locking lock is, INNODB row-level locking which of two kinds, explaining its meaning

What are the general steps 3.SQL optimization, how to see the execution plan, how to understand the principle of the meaning of each field, the index?

4. Database deadlock, give an example of deadlock, mysql how to solve deadlock

5.MYsql index implementation

6. The difference between clustered index and non-clustered index

7. BTREE B + tree database and the difference



At last

Welcome to share with everyone, like the point of a praise yo remember the article, thanks for the support!


Guess you like

Origin blog.51cto.com/14442094/2432111