Interview Questions

I interview experience, only for the convenience of the record.

Android

  1. Handler How many loopers can there be in a thread

    Handler postdelay on time? Synchronization barrier

    If target is null, it is regarded as a synchronization barrier and receives asynchronous messages.

    Idle Handler: Check the depth, next

    Looper, only one thread per thread, how to ensure that ThreadLocal,

  2. The view map

  3. Event distribution: How does action-Cancel change the flow of events before and after consumption and event interception

  4. Three-level cache and Glide cache mechanism

  5. RecycleView reuse mechanism, compare listView

  6. Common layout: cotrantsLayout restricted layout

  7. Memory leak encountered

  8. MVC MVP MVVM comparison selection

  9. dp sp dip

  10. Lazy loading of viewstubs, include, and merge

  11. Contentprovider is different from ContentResolver

  12. Four components and responsibilities

  13. Activity Start mode

  14. There are two ways to start a service, different life cycle (when to create and when to destroy), when to call the same service in multiple places, when to destroy

    IntentService

  15. Lifecycle callback of the global activity can be registered in the application. OnStop () can be used to monitor the activity of the third party SDK. If you use a base class, all activities inherit from the base class and can only monitor their own interfaces

  16. Multi-process: When a new activity or service is added to the child process, create the child process. In the manifiest file, set the name of the child process with the service property process

  17. Multi-process communication: ContentProvider, Broadcast, AIDL (mostly used)

  18. Webview: Interacting with front-end pages, annotating, flexible deployment

  19. Handler memory leak: Use of handlers in activities, static declaration of handlers, weak references, message clearing in ondeStory ()

  20. Apk package optimization: AS ProGuard confusion, analyzer APK analysis, resource file size reduction (designer’s image is too large, reduce their own in reference; Suitable for mainstream models, delete xxxHDPI package under the picture, so library, delete x86 library),

  21. Bitmap memory footprint calculation, loading images

  22. Invalidate() and postInvalidate()

  23. ViewTouch event

  24. Two types of registered blog.csdn.net/u011484134/ radio…

  25. The life cycle when the Activity is restarted

  26. Describe the startup mode of the activity in combination with wechat

  27. What is the relationship between onTouch(), onTouchEvent() and onCLick()?

  28. Activity startup process: Instument

    Juejin. Cn/post / 688308…

  29. Task stack and return stack: netease Cloud Music jumps to Taobao, and click to return to the home page of Taobao

  30. Custom view methods

  31. Which of the four Android components are you most familiar with? Life cycle when switching between activities and portrait screen? Don’t rebuild the activity: cofigchanges

    What is the best way to exchange data between an activity and two fragments?

Java

  1. Parameter passing: value reference and address reference

  2. For loop call order

  3. Design stack, error design

  4. Multithreaded development, thread pool parameter meaning, producer-consumer pattern

  5. Abstract classes and interfaces

  6. How does hashMap add elements, is it thread-safe, why does hashTable and ConcurrenthashMap perform well, how does HashMap resolve hash conflicts, default size, and expansion optimization

    The size of hashmap is set to 1000, and the actual size is set to 1024, because the size is 2 ^ N, and the list + array is changed to tree + array

  7. Java GC algorithm

  8. Java threads stop prematurely, interrupt(),

  9. Thread safety, which locks are used, the meaning of Volitate, CAS

  10. Deadlock generation conditions, working deadlock generation scenarios and how to solve, is the cycle of waiting must cause deadlock

  11. How and to whom Synchronized is used, different from Volitale, and atomicity guaranteed by Voltale? Order?

Computer literacy

  1. Get is different from Post
  2. Principles of HTTPS asymmetric encryption and symmetric encryption and offline push
  3. TCPIP four layer structure, TCP congestion control, Websocket, socket, socket, one end of the socket is abnormally disconnected, how to handle the other end
  4. tcp udp
  5. Difference between HTTPS and HTTP Asymmetric encryption applies to keys, while symmetric encryption applies to data

Third Party Framework

  1. Toutiao autosize implementation principle

  2. Leakcancary Memory leak found after use, Dialog

  3. Okhttp features (not available in other libraries), Retrofit, replace underlying DNS? Retrofit type safety? CallAdapter, convertAdapter function, common asynchronous programming RXJava

    Retrofit, OKHTTP interceptor Chain of Responsibility mode 5 big interceptors, 2 layer user custom interceptors (application interceptors and network interceptors) RXJava wrapper mode, observerOn works every time, subOn works only the first time

    Okhttp socket short connection long connection, Android how to maintain a socket connection, keep service alive, keep the socket active with the server constantly open, okHTTP has related functions.

  4. A sends A message to B, and B tells A after receiving it, is it appropriate to use Eventbus? What would be more appropriate?

other

  1. Kotlin
    • Java null pointer exception
    • The difference between coroutines and processes
  2. Flutter
    • How to implement a cross-platform, self-rendering engine; Use messagechannel for native communication
    • Have you seen it? What is included in apK after compilation? Interact with native? What is the underlying container of a Flutter View? Hybrid stack?
  3. Development of Hybird
  4. Design patterns used
  5. Davlink and art
  6. Git: Merge rebase
  7. Threaded single-core CPU is different from multi-core CPU
  8. AOP plugging pile