Vivo overturned on the one hand and Ali Java social recruitment interview

Stay up late and be bald 2021-08-06 06:13:52 阅读数:941

本文一共[544]字,预计阅读时长:1分钟~
vivo overturned hand ali java

======

**1.**JDK JRE

2.?Java Do you understand ? Talk about the usual exceptions ? Give voice 6 Common java abnormal . What exceptions have the writer encountered What are the runtime exceptions

3.? object-oriented Several characteristics of facing objects What about polymorphism

4.? Modifier :public;protect;default;private priority

5.? Yes string Class .stringbuffer and stringbuilder

6.? The reflection mechanism is introduced

7.?bio,nio,aio Separately ,nio How to implement

8.? Asked public Equivariant defines the time domain of the modifier

9.? Asked about the reflection mechanism , I also asked about the advantages and disadvantages of dynamic agent , The benefits can't be answered

10.? The difference between interface and abstract class .

11.? There is one public static final Of HashMap, Can the properties of the inner object be modified ?

12.? Why? java Platform independence The difference between machine code and bytecode JVM A process of loading code

13.?java Data types and their own applications Automatic unpacking and automatic packing and their own applications, that is, when they are used , List several situations

14.? What are value passing and reference passing , Difference and application

15.? Overloading and rewriting

16.?static Method can override , The difference between interface and abstract class

17.? You feel java What kind of language is it and java characteristic

18.?lamda Do you understand ?1.8 What are the new features ?( The interview dictionary is wrong about the problem of interface abstraction , Out of date )

19.? How did the memory leak happen , How to troubleshoot

20.? Tell me about final Modifier .

**21.** How much memory does an object occupy .

22.? Shortest path problem

23.?java Shallow copy and deep copy

24.? Cause and treatment of memory leak

25.?java The reflex mechanism , Advantages and disadvantages

26.? Talk about the difference between static variables and non static variables , Is there any difference between calling a static variable with a class name and calling a static variable with an instance object ? Can there be static variables in non static methods ?

27.?static Can it be rewritten ?

  • The purpose of rewriting methods is to be polymorphic , Or say : Rewriting is the premise of polymorphism , That is, rewriting occurs in inheritance and is directed at non - static Methodical .

    As like as two peas, the syntax subclasses are allowed to appear in the same way as the parent class static Method , But when a parent class reference points to a child class object , What is called through the parent class reference is still the parent class static Method , Not subclass static Method . namely : Grammatically static Support to rewrite , However, the operation effect can not achieve the purpose of polymorphism

**28.** serialize , Deserialization , When to use ? How to serialize an object

Java Collection classes

=======

1.?Hashmap Bottom ( Array + Linked list + Red and black trees )hashmap Why thread is not safe , How to ensure thread safety , It's about concurrenthashmap hashmap Underlying implementation What happens to multithreading What is the capacity expansion mechanism and why is it deadlocked How to solve collision Jdk 1.8 The optimization of the . Why use red black trees , How does it achieve efficiency optimization ? hashmap Understand No , What is the principle , I don't know , Jump tables don't understand , Red and black trees don't understand , Red black tree insertion process ,B+ Trees don't understand ,B+ Tree features and insertion process , The difference between adjacency table and adjacency matrix , Where to use , The process of inserting and querying .

2.?concurrenthashmap1.7 and 1.8 The difference between ;concurrenthashmap say something , How does it ensure thread safety ?jdk1.7 Of hashentry and segment lock . To be specific segment lock ? Can you talk about it ConcurrentHashMap The implementation principle of JDK7 perhaps 8 Will do

3.? Common collection classes Implementation class

4.?list and set difference ( repeat / No repetition )

5.?set,list,map( Thread safe map,map How to realize it and so on )

6.? Red and black trees introduce , Compare it with the balanced binary tree , What are the application scenarios of red black tree

7.? What are your common data structures ?

8.? Characteristics of the red black tree ,AVL Trees

9.? Consistency hash function and hashmap Of put Method

10.? Array 、 Binary search tree 、B Trees 、B+ Trees

11.? Heap and stack . Pile up 、 Stack

12.? The maximum number of nodes in a binary tree ;2^n-1;

Java Concurrent

======

1.?java How to create threads ,runnable and callable difference ( Different parameters )1. java What are the status of threads ; Several states of threads

2.?wait and sleep The difference between ;wait and notify Usage scenarios of ;

3.? Introduce to you volatile And the principle ;volatile Introduce to you Volatile How is the underlying implementation ? About memory visibility and memory barrier ,Volatile It's an absolute line 2 Is Cheng safe ? No , There's no guarantee of atomicity .volatile Keyword in thread communication problem

4.? Introduce to you synchornized And the principle ; lock and synchornized The difference between ;synchronized Lock upgrade process ?Synchronized, How is the underlying implementation ? Said the monitor Object head , And two monitorenter and monitorexit Apply to code blocks . What information is stored in the object header ? say something synchronized Lock optimization process ? Said something , The spin , Light weight and weight .

5.? Introduce to you AQS;

6.? Let's talk about the principle of fair lock and unfair lock ;

7.?cas What is the operation , And possible problems ;

8.? Thread pool , Then how do you usually use it , working principle , What are the important parameters , What are the saturation strategies ; Thread pool understand , Talk about how to implement thread pool ? What are the core parameters ? What are the blocking queues ? How to gracefully close the thread pool Thread pool ( Thread size , Blocking queues ) Thread creation , Thread pool parameters , Talk about your common thread pool ? Said the new ***d and newFixed. And introduce various parameters

9.? Talk about the pessimistic lock and optimistic lock you understand ? What are the optimistic locks ? What are the disadvantages of optimistic lock ?

10.? Blocking queues Inter thread communication mode Create thread mode Create a thread pool Common thread pool parameters

11.? What are the locks

12.? Talk about the concurrent packages you often use JUI?

13.? Asked how to ensure multi-threaded communication

14.? You used Java Of J.U.C And let's , Tell me about AQS Principle

15.?CAS Tell me the principle of , How does he ensure the visibility of memory .CAS What problems will arise

16.? know Java Memory model in , It has 8 Give me an instruction

17.? How to keep multithreading synchronized ?

18.?java Keywords of visibility and its principle .

19.?cpu Intensive multithreading and io Comparison of intensive multithreading .cpu How to manage multithreading in intensive ? What kind of thread pool and blocking queue ?

20.?cpu What problems will happen if there are too many threads ?io How to reduce the number of threads required in intensive ?

21.?io Principle and implementation of multiplexing . How to reduce processing io( And disk io Interaction ) Required threads ?

22.? Thread implementation . What's the difference? . Communication between threads , Communication between processes .

JVM

===

1.?JVM Runtime memory partitioning ? Which threads are private ? Run time data area , What are private shares ? How heap memory is allocated ?

2.? Object lifecycle ?

3.?JVM Garbage collector ,cms and g1 Characteristics , What's the difference between the two , Than g1 What do you know about the more advanced garbage collector ,ZGC principle , How much memory can be managed ,CMS How much memory can you manage ,G1 Well

4.?JVM Memory model The life cycle of a class Class loading process Do you understand the parental delegation mechanism Into the old generation Under what circumstances directly into the elderly generation

5.?JVM Distribution of memory ( Stack, etc , Program counter +jvm Stack + Local method stack threads are not shared , Heap and method area thread sharing )

6.? Class loading mechanism , The process , Class loading mechanism ? How to customize the implementation of class loader ? Parent delegation model 、 Class loader classes , The essence of parental delegation model is to solve what problem ? Security , What kinds of loaders are there ? Class loading process . Know which class loaders . The relationship between class loaders ? Parent delegation model . Why use the parental delegation model ?

7.? Garbage collection algorithm , Common garbage collectors and the differences between them , Where does garbage collection happen , How to judge the survival of the object 、GC Roots What are the details 、 Talk about object allocation and recycling , What can be the object of garbage collection , Garbage collection algorithm and process .

8.? Under what circumstances will the stack overflow ?

9.? Where static variables are stored in memory ?

10.? How to check java Virtual machine memory usage ?

11.? How to reduce full gc The number of times ? Whether the method area needs gc

12.?4 Reference types

computer network

=====

1.? Enter a url Post process ; The whole process of sending a request from the browser

2.?OSI Seven and TCP Four layer protocol ,OSI Seven layer model / Five layer model , What are the protocols for each layer ,http,tcp,ip On which floor

3.?TCP Three handshakes, four breakups ,tcp Why four waves , Why? TCP Is safe ,TCP,UDP The difference between

4.?TCP Message structure ,HTTP structure , TCP,UDP,HTTP The message format of ( I am stupid )

5.? Design an application layer protocol ( No answer

6.?HTTP Protocol connection process ,HTTPS Connection process ,HTTP How long connections are made HTTP2 and HTTP1 difference ,HTTP Request process http Several ways to ,HTTP Follow HTTPS The difference between ,https The encryption process

operating system

====

1.? Program , Difference between process and thread

2.? When to use multithreading ?

3.? How do processes communicate ?

4.? How do the processes and threads in a mobile phone application work ?

5.? Deadlock , How to solve the deadlock , Deadlock condition , How to prevent

6.? State of process : Blocking + be ready + perform

7.? Cell phone memory 8g, yes 32 Bit , How much memory can a process request ?

8.? Thread application , give an example , Thread blocking

9.? Difference between main thread and sub thread

Linux :

=======

1.?linux How to view CPU load top

2.?linux Used it ( It's about the depth model I trained , The little brother directly asked a scene question ) Scene question : How to control the advertising push frequency in the recommendation algorithm ( Combined with reinforcement learning, I said some

3.?Linux Understand No ,df dh difference , How to format a disk , Disk mount process ,tcp How to check packet loss ,docker What is it achieved with

4.? How to find files with a specific suffix or prefix

Mysql

=====

1.? Database engine transaction isolation level , How to realize serialization , Isolation level of database ? four . What isolation level do you usually use . Database isolation level and what problems are solved respectively

2.?MySQL What are the storage engines for ? The difference between them ? You used it mysql Storage engine ? Why choose it ? Realization principle ?

3.? How to judge a SQL The statement has no index ? Then ask explain Do you know which fields

4.?mysql The storage model difference What do you think of the useless index How to judge sql Statements are good or bad

5.? Index in the database B+ Trees

6.? A mobile app needs to change the database , How is its bottom layer implemented ?

7.?sql The query process

8.?MySQL InnoDB In the storage engine MVCC What problems have been solved , Can you say MVCC The implementation principle of

9.?SQL Write sentences often , Then I'll give you a SQL topic ( Group summation sort )

10.? Under what circumstances do you think an index should not be established

11.?mysql There are several kinds of locks ? How to achieve ?

12.?innodb The level of things

13.?b Tree structure ? Difference from binary tree ? And b The difference between trees ?

14.? Write the most complex sql, Handwritten code : Count the highest scores of each subject : The most complicated ones include sum、case、left join、group by, Ask the difference between left connection and inline , Didn't answer

15.? Cluster index and red black tree

16.?sql : Give a date range , Count the total amount of data stored every day

17.?sql In the sentence like and in keyword

18.?sql sentence , Average more than 60 The student number of the student who is divided into three grades

19.? database sql How to optimize the 20.? In any case, you can't use an index ?

21.?SELECT column_name(s)FROM table_nameWHERE column_nameBETWEEN value1 AND value2 When will a deadlock occur ; How to solve deadlock ;N What about a resource ?

redis

=====

1.? You know, redis What's wrong

2.?redis in zset, About the insertion of jump table , Delete process ;

3.? Do you know the principle ( The bit diagram in the operating system is still bitmap? Do not know much about )

4.?redis data type ,redis Application scenarios of , Why? redis fast

5.?Redis Of key The principle of writing and deleting

6.? How to guarantee Redis High availability

7.?redis data structure ? Single thread or multi thread ?

8.? What kind of queue ? How do you achieve ? I replied redis Of list Realized ) What are the disadvantages of this queue ?

9.? Distributed lock ;

mq

==

1.? You've also used rabbitMQ ah , What it can do ?

2.?rabbitMQ How to ensure that the information is not lost , From the client — Message queue , Message queue — From a server-side perspective

spring

======

1.? What do you know about open source frameworks Why spring Why not new Can automatically produce Can you make one by yourself

2.?spring security do , What is the principle ,jwt Stem what of 3.? What frame is used in the background ?ioc,aop, What other frameworks can do ioc,aop(2333~ No spring?)4.?Spring IOC,AOP, annotation

Design patterns

====

1.? Double search single example

2.? What are the three types of design patterns , Each has something ? Design patterns , What design patterns have been used , Say a few , Design patterns and principles

3.? What kind of proxy model does it belong to

4.? Producer consumer model , Produce consumer's , And multi producer synchronization

5.? Describe the adapter , Write a single example

6.? The singleton pattern , Decoration mode ,

Distributed

===

1.? What are the load balancing algorithms ;

2.?rpc dubbo What are the components of

3.? Distributed transactions ,CAP Theorem , Have you ever used related products

4.?zookeeper Understand?

5.?hbase The structure of the index ,kafka The structure of storage , How binary files are organized ,kafka How to avoid messages ** The loss of ,zookeeper stay kafka What do you do in ,kafka stay zookeeper Data stored in ,zookeeper Understand No ,zookeeper The consensus algorithm , How to solve the problem after partitioning .

6.?protobuf Understand No ,grpc Understand No , What protocol was used ,HTTP2 and HTTP1 difference ,websocket Establish connection process

7.?RPC Do you know ?

8.? How to distributed storage ?

Algorithm

==

1.? What are the sorting algorithms , Briefly describe bubbling and merge sorting , Optimization of bubbling algorithm , Talk about merging and sorting , Bubble optimization, you know ; The answers are equal and do not exchange , also flag Optimize the sorted flag ; Direct insert sort , Write pseudo code or ideas , Insertion sort , Time complexity

2.? Principle of heap sorting

3.? Quick line up , What's the idea of quick platoon , What is the optimization of fast scheduling , Why do you do this ;

4.? Alphabetical order

5.?100 Find the number you want from the number

6.? An array is divided into 2 An equal or close subarray

7.? The shortest path problem of sending orders

8.? Big data , There's no memory , How to quickly find the intermediate value

9.? Tear the stack by hand

10.? Link list find ring Look for the link entry in the linked list , How to do without double pointers

11.? Two way linked list , Wrote a add() and add(index) Of

12.? Find the full array

13.? In the sequence traversal , Recursive non recursive

14.? Find the minimum of the absolute values of the four numbers

15.? Black cat, white cat , Mixed in with , How to distinguish them ? Black, white and gray cats mixed together , How to arrange in black, white and gray order ? There are two small problems I forgot .

16.? How to use a int value , Indicates three states ?

other

==

Finally, summarize my interview experience

2021 In the blink of an eye , It's a good opportunity for many people to change jobs , It's not as difficult as we think , Set your mind , To prepare , You can do that, too .

in addition , If you don't have any questions in the interview, try to talk about your own ideas , Because some questions are not about our programming ability , It's about logical thinking and expression ; Finally, self analysis and evaluation should be carried out at ordinary times , Make a career plan , Trial and error , Improve your programming ability and abstract thinking ability .

Data collection method : Click here for free

BAT The interview experience

Practical series :Spring Family bucket +Redis etc.

Other related e-books : Source code + tuning

The real question of the interview :

版权声明:本文为[Stay up late and be bald]所创,转载请带上原文链接,感谢。 https://car.inotgo.com/2021/08/20210806061245293g.html