android interview questions 2019! The Java chapter of essential skills for first-line Internet mobile architects, smart people have already collected it!

Preface

I often hear people in the group have some negative attitudes towards Android, saying that Android is cold and want to change direction, but if you can become a big cow by changing direction, then everyone can change it.

In fact, there is a "two-eight" law in any direction. There are always 20% of good people. We have to strive to become that 20%, so we must gradually increase our requirements, step out of our comfort zone, and try to break the game!

Now you can no longer stay in the proficient use of RxJava, Retrofit, OkHttp and various image libraries, but must master them thoroughly at the source level. To be clear, no matter how awesome a library is, it is also an awesome author, so we must understand the principles as much as possible.

I would like to give you some suggestions. First, you must endure loneliness and not be disturbed by the outside; second, you must develop a long-term systematic learning plan and persevere; finally, pay attention to learning methods, not casual learning, many people only read books and blogs, but Never try to practice it, the understanding will certainly not be too deep, and it will be easy to forget over time.

If you want to take a high salary to achieve a qualitative leap in improving your salary, the quickest way is for someone to take you to analyze the source code and framework together, so that learning is the most efficient, so here I share some source code and framework videos.

One side (104min)

  • Self introduction.

  • The difference between threads and processes.

  • Thread safety. The interviewer asked if he understood the volite keyword, but Xiaojin forgot to answer it. The interviewer asked whether he knew about spin locks, optimistic locks, pessimistic locks, etc. Xiaojin answered that he understood but never used it.

  • What is the realization of http.

  • The difference between TCP and UDP.

  • Why TCP is reliable. Pay attention to the algorithms involved in the congestion mechanism (slow start, congestion avoidance, fast retransmission, fast recovery).

  • The difference between Get request and Post request. Note that the Get request is more efficient than the Post request. The Post request requires the server to return 100 before sending data processing, and the Get request directly passes the URL. The interviewer asked if he knew other request methods, Put, Delete, Head.

  • Ask an A Activity in the project to jump to a B Activity, walk around the life cycle, click Back to return. What if an A Activity is transparent? What if B Activity is a Dialog? The interviewer asked about the horizontal and vertical screen switching life cycle and whether he knew about onConfigurationChanged.

  • The source code of HashMap, the conditions for expansion.

  • There are two algorithms, one is to merge two ordered linked lists, Xiaojin wrote with the idea of ​​merging, sorting and merging process (using the IDE for a long time, many mistakes, but the interviewer is very patient to help me correct errors). One is the idea of ​​outputting the words in a piece of text in reverse order, mainly investigating the knowledge of data structure, using stacks and queues.

  • Ask about Xiaojin's basic situation, internship time, etc.

  • Rhetorical link: Actually, I didn't ask. The interviewer suggested that Xiaojin should have a deeper understanding of common knowledge, look at the source code, write code with Notepad, and look at basic data structures and algorithms.

Two sides (57min)

  • Self introduction.

  • The difference between Android static library and dynamic library.

  • Binder mechanism in Android.

  • Communication between Android processes.

  • Talk about spin lock, internal implementation.

  • Asked about thread synchronization, Xiao Jin said sychroized again, or refer to that blog.

  • I don't know if I understand Java's atomic and many very low-level things. I can't remember, most of them have not answered.

  • Algorithm problem: Solve the shortest path from the start point to the end point of the rectangle. You can only go right or down. This is a simple dynamic programming problem.

  • Ask about Xiaojin's basic situation, internship time, etc.

  • Rhetorical link: Ask Xiaojin what knowledge he needs to improve if he wants to join. The interviewer suggests participating more in actual projects.

Three sides (40min)

  • Self introduction.

  • Difficulties and solutions in the project. Xiaojin is talking about using addView to achieve the effect of pop-up boxes, but it takes a long time. Later, I learned about Fragment and used Fragment instead of addView. The interviewer asked if he could analyze why it is so slow. Xiaojin mentioned the drawing process of Android Activity->PhoneWindow->DecorView->ContentView->WindowManager->RootViewImpl. The interviewer continued to ask about the type of ANR, the reason and the method of investigation. The interviewer continued to ask about the difference between Fragment and Activity and the advantages of Fragment.

  • Talk about the use of multithreading in Android. The interviewer asked how to stop a thread.

  • The principle of Handler. Looper, MessageQueue, Message. The interviewer asked about sending a message to another Handler in one Handler, but Xiao Jin didn't really understand it.

  • Java memory, recovered search algorithms: reference counting and root search algorithms.

  • Algorithm question: Reverse the order of a 32-bit int integer, and Xiaojin uses rounding and remainder to get each bit and save it in the linked list, and then reverse the linked list.

  • Ask about Xiaojin's basic situation, internship time, career plan, etc.

Hr surface (20min)

  • Self introduction.

  • Ask about Xiaojin's basic situation, internship time, career plan, etc.

  • I gave a verbal offer.

At last

Taking into account the length of the article, I made these questions and answers, as well as the questions I have encountered in many years of interviews and some interview materials, into PDF documents. If you need friends, you can privately mail me [Interview] for free

Click here to receive a summary of Android interview materials

%BC%81.md)**

[External link pictures are being transferred...(img-79VPoiO6-1611299181272)]

[External link image is being transferred...(img-HNl2hJ8A-1611299181275)]

Friends who like it can follow, forward, and like thank you!

Guess you like

Origin blog.csdn.net/CHAMPION8888/article/details/112985577