For the interview in the last half month, I remember the following questions haha, I hope it helps
JAVA part
- Talk about polymorphic encapsulation and inheritance
- Talk about unboxing and packing
- How many bytes do int, short and double occupy in the JVM
- Bit operation, one's complement of original code
- What is reflection, how is reflection implemented at the bottom, talk about class loader
- What is generic and what is generic erasure
- How to deduce the specific type when deserializing
- Talk about the GC mechanism, do you understand the garbage collector?
- Know which design patterns
- Handwriting a single case of double lock check
- Why do lazy singleton mode add volatile
- The difference between volatile and syncronize
- Talk about syncronize (heavyweight lock, partial lock, lightweight lock, monitorenter, monitorexit)
- How to achieve inter-thread communication
- Principle of hashmap, is thread safe, talk about red-black tree
- Talk about TCP's three handshake and four wave of hands
- The difference between HTTPS and HTTP, SSL process
- How to realize the resumable transfer
- What is an inner class
Android part
- Activity life cycle, when onRestart is called
- A detailed process of switching from A to B and then returning from B to A
- How does Activity save data? Such as horizontal and vertical screen switching. In what form is the data stored
- How is the View saved?
- Four startup modes, singleTop Activity starts its own life cycle by itself
- Fragment life cycle
- How to choose Activity and Fragment
- Service keep alive
- 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?
- Activity start process. App startup process. System startup process.
- App life cycle
- Are SQlite and SharedPreference thread safe, and have they been optimized?
- Dynamic permission application
- Talk about Handler (from the aspects of Handler, Looper, MessageQueue, Message. It can be extended
- ThreadLocal, synchronization barrier, memory leak)
- 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?
- The principle of removeCallbacks
- Do you know about event distribution, talk about the DispatchTouchEvent method (source code)
- onTouch and onTouchEvent
- Touch event distribution process
- How to deal with sliding conflicts in the project?
- 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?
- Talk about the drawing of View. How to rewrite the onMeasure method, various parameters, and how to judge the size of the control?
- From the onDraw method of View to sending asynchronous messages through Handler to draw, what happened?
- The difference between ListView and RecyclerView
- RecyclerView's caching mechanism
- The difference between MVC, MVP, MVVP
- Advantages of DataBinding
- RxJava principle and how to switch threads
- Okhttp source code analysis, distributor and interceptor
- Talk about the role of the five major interceptors. The header is assembled in that interceptor
- How the cache interceptor is implemented
- What design pattern does the interceptor use? What are the benefits of the chain of responsibility model?
- Retrofit source code analysis, talk about dynamic proxy.
- How retrofit combines Okhttp and Rxjava (adapter)
- Glide source code, how to monitor the life cycle, the realization of triple cache
- Talk about the Binder mechanism, including driver initialization, memory mapping, and one-time copy
- Are you familiar with AIDL, talk about the classes and functions generated by aidl (proxy, stub)
- Startup optimization, memory optimization, screen adaptation, memory leak.
- Android version features, the difference between different versions of api
- Benefits of multi-process App (involving browsers)
- 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