Hardcore! 2023 Android interview guide, covering all core Android skills

foreword

This year, we can clearly feel the downturn in all walks of life, and the Internet industry is also the first to bear the brunt. Recently, everyone has reported that interviews are becoming more and more difficult. Interview stereotyped essays are also being examined more and more carefully, getting lower and lower, and interview opportunities are becoming less and less visible to the naked eye.

Here, I will summarize the interview tips for you! If you are not ready for the interview, don’t interview casually. Some large companies will have interview evaluation records. Too many bad reviews will affect future interviews.

Need to prepare before the interview

  1. Android stereotyped essay: understand the question types and answer ideas of common examinations;

  2. Algorithm: Do 100-200 questions. Remember that the most important thing to do is to understand the idea. Don’t memorize it by rote. It is difficult to encounter the original question, but most of the ideas are the same.

  3. Project: Mainly prepare for the business and project that a company is responsible for recently:
    the background of the project, why this project is to be done;
    the evolution of the system, which stages are there, and what is mainly done in each stage
    ; Type, research when using some tools and frameworks in the project, why did you choose
    the highlight of this project: it is the most awesome thing you have done in the project, complex demand scheme design, performance optimization, online problem handling, project refactoring etc;

  4. Project management: mainly when leading a cross-team project, how to efficiently coordinate the work of each team, and which methods to use to ensure the on-time delivery of the project. When the project encounters difficulties, how to deal with it as the project leader and so on. Like architecture design, this one becomes more and more important as experience increases.

  5. General questions: A few questions that are relatively easy to ask are:
    1) Why did you leave the company;
    2) Which abilities have been developed in the previous company;
    3) How do you usually learn?

  6. Ask the interviewer: At the end of each interview, the interviewer will usually ask if there is anything you want to ask. If you don’t know what to ask, you can ask what business the team is currently responsible for? What are the main challenges?

The editor also sorted out the real Android development interview questions of big companies such as Byte, Ali, Tencent, and NetEase this year. Due to the large amount of content, only part of the interviews are shown below. Friends who need complete interview questions can scan and collect at the end of the article! !

Java aspect

Java basics

  • Difference between abstract class and interface?
  • Talk about final, static, synchronized respectively
  • Please briefly describe String, StringBuffer and
  • What are the differences and usage scenarios between "equals" and "==" 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 is String designed to be immutable?
  • Tell me about your understanding of Java annotations?

java collection

  • Talk about the difference between List, Set, and Map?
  • Talk about the difference between ArrayList and LinkedList?
  • Please tell me the difference between HashMap and HashTable
  • Talk about the expansion mechanism of ArrayList?
  • How does HashMap work?
  • Please briefly describe the working principle and usage of LinkedHashMap?
  • Talk about the 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 multithreading?
  • Talk about thread deadlock, how to effectively avoid thread deadlock?
  • Talk about the reason for thread blocking?
  • Please talk about the difference between run() and start() in Thread?
  • 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?
  • Talk about several common locks in java threads?
  • Talk about the difference between thread sleep() and wait()?

Java virtual machine

  • Talk about the JAVA garbage collection mechanism?
  • Answer what are strong, soft, weak, phantom references and the difference 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 are JMMs? What problems does it have? How to solve it?

insert image description here

Android side

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?
  • Talk about the difference between startService and bindService, life cycle and usage scenarios?
  • 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 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 posture of IntentService?
  • Advantages and disadvantages of AsyncTask?
  • Talk about your understanding of Activity.runOnUiThread?
  • Can the child thread update the UI? Why?
  • Talk about the Handler mechanism and principle?
  • Why does creating a Handler in a child thread throw an exception?
  • There is a Loop infinite loop in the Handler, why the main thread is not blocked, what is the principle?

data structure

  • What is bubble sort? How to optimize?
  • Please implement a simple singly linked list in Java?
  • How to reverse a singly linked list?
  • Talk about your understanding of time complexity and space complexity?
  • Talk about how to judge a linked list into a ring?
  • What is a red-black tree? Why use a red-black tree?
  • What is quick sort? How to optimize?
  • Talk about circular queues?
  • How to judge the intersection of single linked list

insert image description here

Android Framework

Binder

  • What are the advantages of Binder
  • How does Binder make a copy
  • Do you understand the memory mapping principle of MMAP?
  • How does the Binder mechanism work across processes
  • Talk about the communication mechanism of the four major components
  • Why Intent cannot pass large data

Handler

  • What is HandlerThread? Why does it exist?
  • Briefly describe the overall principle of the Handler mechanism?
  • Where does Looper exist? How can you guarantee that the thread is unique?
  • How to understand the role of ThreadLocal?
  • The similarities and differences between the main thread Main Looper and the general Looper?
  • How does Handler or Looper switch threads?
  • Why doesn't the infinite loop of Looper's loop() get stuck?
  • How can Looper's waiting be accurately woken up?
  • How to get Message? Why is it designed this way?

AMS

  • What is ActivityManagerService? When was it initialized? what's the effect?
  • What is ActivityThread? What is ApplicationThread? The difference between them
  • What is Instrumentation? What is the relationship with ActivityThread?
  • How is the communication between ActivityManagerService and zygote process realized.
  • ActivityRecord、TaskRecord、ActivityStack,Activi
  • ActivityManager、ActivityManagerService、Activit
  • Simplified version of AMS implemented by handwriting

insert image description here

Algorithms

  • How to use binary search algorithm
  • How to effectively solve the problem of contact with water
  • Binary Search Efficiently Determines Subsequences
  • How to remove duplicate elements of sorted array
  • How to find the longest palindrome substring
  • How to perform modular exponentiation efficiently
  • How to use greedy thinking wide area to play jumping game
  • How to efficiently judge palindrome linked list
  • How to randomly extract elements in an infinite sequence
  • How to determine the legality of brackets
  • How to find missing and duplicate elements
  • Please talk about the principle of HashMap and SparseArrary, the advantages of SparseArrary compared to HashMap, how does ConcurrentHashMap achieve thread safety?
  • Please talk about the principle of HashMap, the access process, why red-black tree is used, the comparison between red-black tree and complete binary tree, HashTab, concurrentHashMap, what is 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, insert the position)?

insert image description here

Kotlin aspect

  • Please briefly describe what is Kotlin? What are its characteristics?
  • How many 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 for data types in Kotlin? Why?
  • What are the ways of collection traversal in Kotlin
  • What is the principle of Kotlin's built-in standard function let?
  • What is the principle of the run high-order function of the 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 basic stream structure of MPEG video?
  • Tell me about the data structure of ffffmpeg?
  • How to reduce latency? How to ensure fluency? How to solve Caton? Solve network jitter?
  • What are the soft solution and hard solution usually mentioned?

insert image description here

Flutter aspect

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

insert image description here

Friends who need complete interview questions, scan the QR code below to get it! ! !

Guess you like

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