2023 Golden Nine Silver Ten Android Senior Engineer Interview 1000 Questions + Answers (Full)

Preface

Facing the peak recruitment season of the Golden Nine and Silver Ten, I think it would be irresponsible for me if I did not prepare carefully; as far as we Android programmers are concerned, most companies generally interview based on self-introduction + project introduction + project details/ difficulties It is a process of asking questions + basic knowledge point assessment + algorithm questions .

Some companies may also ask a few actual scenario-based questions. Alibaba must ask this question. There is usually no correct answer to this kind of question. It depends on personal understanding and personal accumulation. The rest is nothing, just changing the soup without changing the medicine. When talking about projects, it depends on whether you understand your own project thoroughly. For example, I often ask you why you chose this technology, why you handled it this way, etc. There are only so many basic knowledge points in the test, and the final algorithm is based on answering questions.

What I would like to share with you today is the interview question bank that is most frequently used by Internet companies. After careful sorting, all questions have been updated with detailed answer analysis to facilitate everyone's reading and learning.

This interview question is divided into thirty-two modules in total, which are: " Java basics, collections, multi-threading, virtual machines, reflection, generics, concurrent programming, Android's four major components, asynchronous tasks and message mechanisms, UI drawing, Performance tuning, SDN, third-party framework, design pattern, Kotlin, computer network, system startup process, Binder, Handler, AMS, Dart, Flutter, algorithm and data structure, NDK, H.264, H.265. Audio codec , FFmpeg, OpenMax, OpenCV, OpenGL ES ", as shown in the figure below:
insert image description here

Interview question display

Java aspect

Java basics

  • What is the difference between abstract class and interface?
  • Let’s talk about final, static, and synchronized respectively.
  • Please briefly describe String, StringBuffer and
  • What are the differences and usage scenarios between "equals", "==", and "hashCode"?
  • What is the difference between deep copy and shallow copy in Java?
  • Talk about the difference between Error and Exception?
  • What is the reflection mechanism? What are the application scenarios of the reflection mechanism?
  • Talk about how to rewrite the equals () method? Why rewrite hashCode()?
  • Talk about your understanding of type erasure in Java generics, and talk about its limitations?
    -Why should String be designed to be immutable?
  • Tell me about your understanding of Java annotations?

Java Collections

  • Talk about the differences between List, Set, and Map?
  • Talk about the difference between ArrayList and LinkedList?
  • Please tell me the difference between HashMap and HashTable
  • Let’s talk about the expansion mechanism of ArrayList?
  • How is HashMap implemented?
  • Please briefly describe the working principle and usage of LinkedHashMap?
  • Talk about your understanding of ConcurrentHashMap?

Java multithreading

  • What are the ways to use multithreading in Java?
  • Talk about several states of the thread?
  • How to achieve synchronization in multiple threads?
  • Let’s talk about thread deadlock. How to effectively avoid thread deadlock?
  • Talk about the reasons for thread blocking?
  • Please talk about the difference between run() and start() in Thread?
  • What is the difference between synchronized and volatile keywords?
  • How to ensure thread safety?
  • Talk about the usage and principle of ThreadLocal?
  • What is the difference between notify and notifyAll in java thread?
  • What is a thread pool? How to create a thread pool?
  • Let’s talk about the common locks in Java threads?
  • Let’s talk about the difference between thread sleep() and wait()?

Java virtual machine

  • Let’s talk about JAVA garbage collection mechanism?
  • Answer: What are strong, soft, weak, and virtual references and the differences between them?
  • Briefly describe the loading mechanism and loading process of classes in the JVM?
  • The principles and differences of JVM, Dalvik, and ART?
  • Please talk about Java's memory recovery mechanism?
  • What is JMM? What problems does it have? How to solve it?

insert image description here

Android aspect

Four major components

  • What are the common communication methods between Activity and Fragment?
  • Application scenarios of LaunchMode?
  • How much do you know about Context?
  • What is IntentFilter? What are the usage scenarios?
  • Let’s talk about the difference, life cycle and usage scenarios between startService and bindService?
  • How does Service keep alive?
  • Briefly introduce how ContentProvider realizes data sharing?
  • Talk about the life cycle of Activity when switching between horizontal and vertical screens?
  • Is there a limit to the size of data transmitted by an Intent? How to solve?

Android asynchronous task and message mechanism

  • What are the usage scenarios and usage of HandlerThread?
  • What are the application scenarios and usage postures of IntentService?
  • Advantages and disadvantages of AsyncTask?
  • Talk about your understanding of Activity.runOnUiThread?
  • Can child threads update UI? Why?
  • Talk about the Handler mechanism and principle?
  • Why does creating a Handler in a child thread throw an exception?
  • There is an infinite loop in Handler. Why is it not blocking the main thread? What is the principle?

data structure

  • What is bubble sort? How to optimize?
  • Please use Java to implement a simple singly linked list?
  • How to reverse a singly linked list?
  • Talk about your understanding of time complexity and space complexity?
  • Let’s talk about how to judge whether a linked list is a ring?
  • What is a red-black tree? Why use red-black trees?
  • What is quick sort? How to optimize?
  • Talk about circular queue?
  • How to determine singly linked list intersection

insert image description here

Android Framework

Binder

  • What are the advantages of Binder?
  • How does Binder achieve one copy?
  • Do you understand the memory mapping principle of MMAP?
  • How does the Binder mechanism work across processes
  • Let’s talk about the communication mechanism of the four major components
  • Why Intent cannot deliver big data

Handler

  • What is HandlerThread? Why does it exist?
  • Briefly describe the overall principle of the Handler mechanism?
  • Where does Looper exist? How can we ensure that threads are unique?
  • How to understand the role of ThreadLocal?
  • What are the similarities and differences between the main thread Main Looper and the general Looper?
  • How does Handler or Looper switch threads?
  • Why does Looper's loop() infinite loop not get stuck?
  • How can Looper's waiting be accurately awakened?
  • How to get Message? Why is it designed like this?

AMS

  • What is ActivityManagerService? When was it initialized? what's the effect?
  • What is ActivityThread? What is ApplicationThread? Their differences
  • What is Instrumentation? What is the relationship with ActivityThread?
  • How communication between ActivityManagerService and zygote process is implemented.
  • ActivityRecord、TaskRecord、ActivityStack,Activi
  • ActivityManager、ActivityManagerService、Activit
  • Handwriting implements simplified version of AMS

insert image description here

Algorithm aspect

  • How to use the binary search algorithm
  • How to efficiently solve water connection problems
  • Binary search efficient decision subsequence
  • How to remove duplicate elements from sorted array
  • How to find the longest reply substring
  • How to perform modular exponentiation efficiently
  • How to use greedy thinking to play jumping games in a wide area
  • How to efficiently judge the backlink list
  • How to randomly extract elements from a wireless sequence
  • How to determine the legality of brackets
  • How to find missing and duplicate elements
  • Please talk about HashMap, the principle of SparseArrary, the advantages of SparseArrary compared to HashMap, and how ConcurrentHashMap achieves thread safety?
  • Please talk about the principle of HashMap, the access process, why red-black trees are used, the comparison between red-black trees and complete binary trees, HashTab, concurrentHashMap, and what are in the concurrent package?
  • Please talk about the underlying principle of hashmap put(). When a conflict occurs, how to add it (traverse along the linked list and compare the key values ​​​​one by one to see if they are consistent. If they are consistent, overwrite and replace them. After the inconsistent traversal is completed, insert the position)?

insert image description here

Kotlin aspect

  • Please briefly describe what is Kotlin? What properties does it have?
  • What are some common ways to implement singletons in Kotlin?
  • In Kotlin, what is an inline function? what's the effect?
  • Please talk about Coroutines in Kotlin, how is it different from threads? What are the advantages?
  • Talk about the similarities and differences between Any in Kotlin and Object in Java?
  • Are there implicit conversions of data types in Kotlin? Why?
  • What are the ways to traverse collections in Kotlin?
  • What is the principle of Kotlin's built-in standard function let?
  • What is the principle of run high-order function in Kotlin language?

Audio and video

  • How to optimize live streaming in seconds?
  • What are the methods of digital image filtering?
  • What are the features that can be extracted from an image?
  • FFMPEG: How to synthesize video from pictures
  • What are the common audio and video formats?
  • Please describe the MPEG video basic stream structure?
  • Let’s talk about the data structure of ffffmpeg?
  • How to reduce latency? How to ensure fluency? How to solve lag? Solving network jitter?
  • What are the soft solutions and hard solutions that we usually talk about?

insert image description here

Flutter aspect

  • Features of Dart language?
  • How does Dart multitask in parallel?
  • Is dart pass by value or pass by reference?
  • What are the features of Flutter?
  • What is the relationship between Widget, element and RenderObject?
  • What are the conditions for using mixins?
  • Stream two subscription models?
  • What are the core concepts of Widget, State, and Context in Flutter? What problem is it to solve?
  • Let’s talk about the differences and principles between Hot Reload, Hot Restart and hot update.
  • How does Flutter communicate with Android iOS?
  • Let’s talk about what state management is and why it is needed?

insert image description here

at last

If you need interview questions, scan the QR code below to get them for free! !

Guess you like

Origin blog.csdn.net/weixin_43440181/article/details/132765570