I was laid off, and I recorded the Android interview questions shared internally by the company I just joined last year, and they were exposed to the public.

These are the interview questions I have collected recently, dedicated to students who plan to find jobs after the year. The knowledge involved in the article is relatively broad and may be scattered, and I have omitted some of the more basic knowledge (such as what are the four major components of Android). Some of them I have attached my own understanding, and some of them have attached detailed information. Links to related articles. You can just pick the content you are interested in and check it out. I will continue to add more in the future.

Chapter 1 Algorithms and Data Structures Interview Questions

  • 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, compare the key values ​​​​one by one to see if they are consistent, and if they are consistent, overwrite and replace them. After the inconsistent traversal is completed, insert the position)?
  • Please tell me how ArrayList ensures thread safety, other than adding keywords?
  • Please talk about ArrayList, HashMap, LinkedHashMap?
  • Please talk about the implementation principle of HashMap, the conditions for expansion, and what are the conditions for converting a linked list into a red-black tree?

  • Insert image description here

Chapter 2 Java Core Basics Interview Questions

  • Java provides abstract classes and interfaces. How to choose during development?
  • What do overloading and rewriting mean, and what's the difference?
  • What are static inner classes? What is the difference from non-static inner classes?
  • When passing parameters in Java, do you pass by value or by reference?
  • The difference between using equals and == for comparison
  • String s = new String(“xxx”);How many String objects are created?

Insert image description here

Chapter 3 Java in-depth generics and annotation interview questions

  • What are generics and what about generic erasure?
  • Can List<String> be converted to List<Object>?
  • What is the difference between super and extends in Java generics?
  • What are annotations? What are the usage scenarios?

  • Insert image description here

Chapter 4 Java Concurrent Programming Interview Questions

  • If there is only one CPU, single core, and multi-threading, is it still useful?
  • What is the difference between sychronied modified ordinary methods and static methods? What is visibility?
  • What optimizations has Synchronized made after JDK1.6?
  • The principle of CAS lock-free programming
  • AQS principle
  • Implementation principle of ReentrantLock

Insert image description here



Chapter 10 Framework Kernel Analysis Interview Questions

  • What are the methods of multi-process communication in Android?
  • Describe the principle of Binder mechanism?
  • Why does Android use Binder as the IPC mechanism?
  • What is the working process of Binder thread pool?
  • What is the full name of AIDL? how to work? What types of data can it handle?
  • The difference and connection between Pid&Uid in Android

Insert image description here

Chapter 11 Android Component Kernel Interview Questions

  • Activity life cycle, how to destroy an Activity?
  • The four major startup modes of Activity and issues that need attention during development, such as the call of onNewIntent()
  • Intent display jump and implicit jump, how to use them?
  • Activity A jumps to B, B jumps to C, and A cannot jump directly to C. How does A send a message to C?
  • How does Activity save state?
  • Please describe the activity startup process, starting from clicking the icon.

Insert image description here

Chapter 12 Program Performance Optimization and Data Persistence Interview Questions

  • What is the size of an image 100x100 in memory?
  • Memory optimization, memory thrashing and memory leaks.
  • When does a memory leak occur? Give a few examples
  • Bitmap compression, the difference between 100% and 90% quality?
  • Use TraceView to find CPU usage
  • Memory leak finding

Insert image description here

Chapter 13 Open Source Framework Interview Questions

  • The significance of componentization in projects
  • ARouter principle in componentization
  • Talk about your understanding of APT technology
  • Talk about the caching mechanism design of the Glide framework
  • Talk about your understanding of the Glide life cycle
  • What should be the reason for a memory overflow when using the Glide framework in a project?

Insert image description here

How to obtain documents

Guess you like

Origin blog.csdn.net/m0_56255097/article/details/132826720