2021Android interview questions finishing (1 year)

For the interview in the last half month, I remember the following questions haha, I hope it helps

JAVA part

  1. Talk about polymorphic encapsulation and inheritance
  2. Talk about unboxing and packing
  3. How many bytes do int, short and double occupy in the JVM
  4. Bit operation, one's complement of original code
  5. What is reflection, how is reflection implemented at the bottom, talk about class loader
  6. What is generic and what is generic erasure
  7. How to deduce the specific type when deserializing
  8. Talk about the GC mechanism, do you understand the garbage collector?
  9. Know which design patterns
  10. Handwriting a single case of double lock check
  11. Why do lazy singleton mode add volatile
  12. The difference between volatile and syncronize
  13. Talk about syncronize (heavyweight lock, partial lock, lightweight lock, monitorenter, monitorexit)
  14. How to achieve inter-thread communication
  15. Principle of hashmap, is thread safe, talk about red-black tree
  16. Talk about TCP's three handshake and four wave of hands
  17. The difference between HTTPS and HTTP, SSL process
  18. How to realize the resumable transfer
  19. What is an inner class

Android part

  1. Activity life cycle, when onRestart is called
  2. A detailed process of switching from A to B and then returning from B to A
  3. How does Activity save data? Such as horizontal and vertical screen switching. In what form is the data stored
  4. How is the View saved?
  5. Four startup modes, singleTop Activity starts its own life cycle by itself
  6. Fragment life cycle
  7. How to choose Activity and Fragment
  8. Service keep alive
  9. After using the START_STICKY return value, how long will the service restart after it hangs? Will it restart after hanging up many times? Under what circumstances will it not restart?
  10. Activity start process. App startup process. System startup process.
  11. App life cycle
  12. Are SQlite and SharedPreference thread safe, and have they been optimized?
  13. Dynamic permission application
  14. Talk about Handler (from the aspects of Handler, Looper, MessageQueue, Message. It can be extended
  15. ThreadLocal, synchronization barrier, memory leak)
  16. How does the handler implement the delay Looper will always run? (Epoll mechanism). When there is a delayed message in the queue, will Looper be awakened?
  17. The principle of removeCallbacks
  18. Do you know about event distribution, talk about the DispatchTouchEvent method (source code)
  19. onTouch and onTouchEvent
  20. Touch event distribution process
  21. How to deal with sliding conflicts in the project?
  22. Press the finger on the Button and move it out of the Button. What is the event distribution process? What happens when I press from outside the Button and move to the Button?
  23. Talk about the drawing of View. How to rewrite the onMeasure method, various parameters, and how to judge the size of the control?
  24. From the onDraw method of View to sending asynchronous messages through Handler to draw, what happened?
  25. The difference between ListView and RecyclerView
  26. RecyclerView's caching mechanism
  27. The difference between MVC, MVP, MVVP
  28. Advantages of DataBinding
  29. RxJava principle and how to switch threads
  30. Okhttp source code analysis, distributor and interceptor
  31. Talk about the role of the five major interceptors. The header is assembled in that interceptor
  32. How the cache interceptor is implemented
  33. What design pattern does the interceptor use? What are the benefits of the chain of responsibility model?
  34. Retrofit source code analysis, talk about dynamic proxy.
  35. How retrofit combines Okhttp and Rxjava (adapter)
  36. Glide source code, how to monitor the life cycle, the realization of triple cache
  37. Talk about the Binder mechanism, including driver initialization, memory mapping, and one-time copy
  38. Are you familiar with AIDL, talk about the classes and functions generated by aidl (proxy, stub)
  39. Startup optimization, memory optimization, screen adaptation, memory leak.
  40. Android version features, the difference between different versions of api
  41. Benefits of multi-process App (involving browsers)
  42. How to achieve plug-in skinning (written on the resume)

There are also some project problems (according to resume), program design, and algorithms (brush leetcode)

The interviewer also asked about flutter and Hongmeng compiler. . . It's a bonus item, I
only remember these at the moment, haha

Guess you like

Origin blog.csdn.net/weixin_44173142/article/details/115025270