Order takeout every day, so I decided to run to hungry.

Interview process:

Through boss zhipin website to find the corresponding position, find the application. Two days later, the call came. It was 9 o ‘clock in the morning on a Saturday. The telephone interview asked the Java foundation, Redis, JDK, Spring principle, Mybatis, Dubbo; Later let me go to the scene, asked about Java memory related, Redis memory related, the most skilled technical field.

During the phone interview, the interviewer was very patient to listen to me without suddenly interrupting my thoughts (I felt very comfortable). The on-site interview has to say that the big factory is still a big factory, quite imposing. The company seems to be in perfect order.

Interview questions asked by the interviewer:

On the technical side

  • Understanding of locks in process.
  • A solution to deadlocks
  • The 7-layer structure of the network
  • TCP/UDP is different
  • Three-way handshake
  • Given a URL, how to access it
  • The difference between stack and queue
  • Linked list, bidirectional linked list.

Architect second interview

What is the difference between a Java war file and a JAR file? What is the difference between a Java war file and a jar file? What is the difference between an int and an Integer? How does the heap and stack and thread data are stored in the heap and stack

1. Activity lifecycle and description;

This problem is pediatric, as long as you remember those several methods, know the role of each method is OK.

Ii. Functions and Description of MVC:

The full name of MVC is Model View Controller, which is the abbreviation of Model – View – Controller, a Model of software design; The Model represents the application core (such as a database record list). View displays data (database records). Controller handles input (writing database records). Advantages: Low coupling and high reuse

What is ANR? What would you do if ANR came up?

To be honest, anyone who does Android should know the term ANR, but my mind went blank during the interview and I couldn’t find it. When the interviewer asked me, I remembered it immediately. My answer is: it’s operating procedure takes up time is too long or ANR caused by the main thread is blocked, the solution is the elapsed time long operations asynchronously multithreaded processing or treatment, I think it’s basic right, is the result of the interviewer wants to hear, at least under the present technology and explained in detail. On Android, if your Application is Not responsive for a period of time, the system presents the user with a dialog called the ANR:Application Not Responding dialog. Users can choose to “wait” and let the program continue, or “force shutdown.” So a smooth, sensible application cannot have anR in it, leaving the user to deal with this dialog box every time. Therefore, it is important to design response performance in the program so that the system does not display ANR to the user. By default, the maximum execution time for an Activity on Android is 5 seconds, while the maximum execution time for BroadcastReceiver is 10 seconds.

Common types of ANR

There are generally three types of ANR:

  • KeyDispatchTimeout(5 seconds) — There is no response for major types of key or touch events within a specified time
  • BroadcastTimeout(10 seconds) The BroadcastReceiver cannot complete within a specified period of time
  • ServiceTimeout(20 seconds) — The Service with a low probability cannot complete within a certain period of time

Three: KeyDispatchTimeout

7. A key or touch event was not dispatched within the Specified time Concrete under the framework of the definition of a timeout ActivityManagerService. Java

Why did it time out? The count of the timeout usually starts when the button is distributed to the app. There are two common reasons for timeout:

  • The current event has no chance to be processed (i.e. the UI thread is processing the previous event, didn’t complete in time or the looper is blocked for some reason)
  • The current event is being processed but not completed in time

How to avoid KeyDispatchTimeout

  • The UI thread tries to do only UI-related work
  • Time consuming work (such as database operations,I/O, network connections, or other operations that might block the UI thread) is handled in a separate thread
  • Use handlers whenever possible to handle interactions between UIthread and other threads

So with all the UI threads out there, what are the UI threads? UI threads include: Activity:onCreate(), onResume(), onDestroy(), onKeyDown(), onClick(),etc AsyncTask: onPreExecute(), onProgressUpdate(), onPostExecute(), onCancel,etc Mainthread handler: handleMessage(), post*(runnable r), etc

HR will briefly introduce their past experience and projects on three sides

  • The probability that the robot takes 1 step forward is 1/2, and the probability that the robot takes 2 steps forward is 1/2, and it ends when the distance the robot takes is an integer multiple of 4. Find the expected number of robot steps at the end
  • The husband picks up the wife to go off work, the husband 6:20-6:30 arrive, the wife 6:25-6:30 next office building, if the husband arrives at the wife’s office building later than the wife, will be beaten, beg the husband to be beaten probability.

The last

In view of the recent many people in the interview, I have also sorted out quite a lot of interview materials, there are also other big factories. I hope I can help you.

The answers to the following interview questions are documented in notes. Also sorted out some interview materials & the latest 2020 collection of some big factory interview questions (all sorted into a document, a small part of the screenshots), there is a need to pay attention to the public below to obtain

The latest interview questions

Updated ebook

The latest arrangement of large factory interview documents



The above is all the content of this article, I hope to help you learn, but also hope that you support. One key three link oh!