preface

About a month ago, want to prepare the interview, you inscribe, look casually in the net interview found that are not to give a detailed answer or the answer is not deep enough, perhaps I didn’t find 😢), anyway I am a little upset, because I after all is a lazy man, just want to look at the interview questions, then think about your own, take a look at some reference answer, by the way, look at your answer is not comprehensive, etc., all I don’t know how many friends are like me.

Gospel of the Lazy: Why say lazy Gospel, recently, Ali ushered in a milestone, the first Android architecture technology growth notes, both theory and practice, by the industry rating “diamond”, notes not only cover Android development in the entire Internet company’s classic interview real questions, Also from the basic theory to the actual application of Android development of the core content ** “seven topics” analysis incisively and vividly. As soon as this treasure book came out, many members knew that he had won the offer of Toutiao, Douyin and other posts.

According to the data, Alibaba has been rated as the most popular Chinese Internet company for three consecutive years. In fact, Alibaba has certain representation in both technological innovation and social value creation. In the industry, many Internet companies will also be ali as a benchmark, mention ali, believe that is not strange for most programmers, ali, after all, the use of technology always walk in the forefront, programmers and have also been to a line of Internet companies such as ali requirements as the standard, so ali need what kind of person, It has become the development goal and learning direction of many programmers.

In fact, the development of Alibaba cannot be separated from the efforts of every employee in the company. It is worth mentioning that alibaba’s programmers will spare time to improve their technology in addition to completing their own work. Moreover, they have selfless professional spirit and always share good things:

Android interview

Chapter 1 Java section

1. Design patterns (six basic principles, design patterns commonly used in projects, handwritten singletons, etc.)

  • What design patterns do you know
  • Singleton design pattern
  • Factory design pattern
  • Builder Mode
  • Adapter design pattern
  • Decorator pattern
  • Observer Model

2. The characteristics of Java language and OOP thought

3. Talk about how threads are created in Java and how thread pools work.

4. HashMap

  • Constructor for ArrayList
  • Add method source code analysis
  • Get method source code analysis
  • Set method source code analysis
  • Supported operations
  • The Node class
  • AddFirst source analysis

  • GetFirst method source code analysis
  • RemoveFirst method source code analysis
  • Add (int index, E E) method source analysis
  • A constructor
  • Add elements
  • Remove elements
  • Query element
  • Traverse elements
  • All the source code

5. Memory model

  • The memory model generates the background
  • Physical machine concurrency problems
  • Composition analysis of Java memory model
  • Components of the Java memory model
  • Interaction between Java memory operations
  • Java memory model running rules

  • Happens-before relations
  • The memory barrier
  • Special rules for volatile variables
  • Semantics of volatile
  • Implementation principle of volatile variables
  • Usage scenarios of volatile variables
  • Special rules for final variables

6. Garbage Collection Algorithm (JVM)

7. What is the difference between garbage collection and system.gc ()?

8. Class loading process

9. The reflection

10. Multithreading and thread pools

  • Talk about how threads are created in Java, how thread pools work.
  • Is String a basic data type in Java? Is it mutable? Is it thread-safe?
  • Why make it immutable? If String is immutable, what do we change in our usual assignment?
  • What is the difference between String, StringBuffer, and StringBuilder? Are the two ways of creating a String stored in the JVM the same?
  • What is a thread pool and what are its advantages?
  • What does the constructor of a thread pool mean for each parameter to execute the task’s flow
  • Breakpoint continuingly

  • Four Java references
  • Java generics
  • The difference between final, finally and Finalize
  • The difference between interface and abstract class

Chapter ii Computer Networks

  • HTTP, HTTPS, TCP/IP, Socket communication, three-way handshake, four-way wave
  • TCP is different from UDP
  • The entire process from entering the URL to rendering the entire interface, and what protocol is used in the process?
  • This section describes TCP/IP in detail
  • TCP three handshakes and four waves, why not two handshakes? Why wave more?
  • Several HTTP request methods are introduced
  • Format of HTTP request and response packets and common status codes.

Chapter three Android

Article 1. The Android basis

The Activity:

  • What about the Activity lifecycle?
  • What methods does Activity B call when Activity A starts another Activity? What if B is a transparent theme or a DialogActivity?
  • What does the onSaveInstanceState() method do? When will it be called?
  • What are the four startup modes and application scenarios of the Activity?
  • .

Fragments:

  • What about the Fragment lifecycle?
  • What’s the difference between an Activity and a Fragment?
  • The difference between add and replace in fragments
  • The difference between getFragmentManager, getSupportFragmentManager, getChildFragmentManager?
  • FragmentPagerAdapter and FragmentStatePagerAdapter difference and usage scenarios

Service:

  • How about the life cycle of a Service?
  • What are the two ways to start a Service? What’s the difference?
  • How can Service not be killed?
  • Can Service start time-consuming operation? How to do?
  • What system services have you used?
  • Do you know ActivityManagerService? What role to play

Broadcast Receiver

  • How many forms of broadcasting are there? What are the features?
  • Two ways to register a broadcast?
  • Do you understand the principle of broadcast sending and receiving? (Binder mechanism, AMS)

Data is stored

  • Describe how Android data persistence works?
  • The application scenarios of SharedPreferences? What to note?
  • What is the difference between apply and commit in SharedPrefrences?
  • Do you know anything about transactions in SQLite? How is it done
  • Is there a good way to do batch operations using SQLite?
  • How do I delete individual fields of tables in SQLite
  • What optimizations do I get when I use SQLite?

IPC

  • What is the relationship between processes and threads in Android? The difference between them?
  • How do I enable multiple processes? Can N processes be enabled for an application?
  • Why is IPC needed? Possible problems with multi-process communication?
  • Android IPC, advantages and disadvantages of various ways, why Binder?
  • .

View

  • What’s the process of drawing a View?
  • What is a MotionEvent? How many events are involved? Under what conditions does it occur?
  • Describe the View event delivery and distribution mechanism?
  • How to resolve View event conflicts? What is an example from development?
  • .

Handler

  • What about the message mechanism Handler function? What are the elements? What is the process?
  • Can a thread create more than one Handler?
  • The difference between soft and weak references
  • Causes of memory leaks caused by handlers and the optimal solution

  • Why does the system not recommend accessing the UI on child threads?
  • Why does Looper loop death not cause apps to freeze?
  • What happens to message queues when you use Handler’s postDealy?
  • Can I just new a Handler on a child thread? How to do?
  • How can messages be created? Which works better and why?

thread

  • What are the benefits of thread pools? Four kinds of thread pool usage scenarios, thread pool several parameters understanding?
  • What other classes do you know about in Android for thread switching?
  • Explain how AsyncTask works
  • What does IntentService do?
  • .

Bitmap

  • What are some issues to be aware of when using Bitmap?
  • Will bitmap.recycle () be recycled immediately? When will it be recycled? If there’s nowhere to use this Bitmap, why isn’t garbage collection just collected?
  • The memory occupied by a Bitmap and the calculation of the memory occupied
  • Android cache update strategy?
  • How does LRU work?

Performance optimization

  • In the image level 3 cache, the image is loaded into memory, and if memory is about to burst, what happens? How to deal with it?
  • If you load a 500*500 PNG hd image in memory. How much memory should it take up?
  • WebView performance optimization?
  • How does Bitmap handle large images, such as a 30M large image, and how does it prevent OOM?
  • Memory reclamation mechanism and GC algorithm (advantages and disadvantages of various algorithms and application scenarios); GC principles, timing, and GC objects

  • What’s the difference between a memory leak and an overflow? What tools does AS have to detect memory leaks
  • Performance optimization, how to ensure that the application startup does not lag? How to deal with black and white screen?
  • Will strong references be reclaimed if they are set to NULL?
  • RecyclerView and ListView
  • What is the Adapter of the ListView
  • LinearLayout, FrameLayout, RelativeLayout performance comparison.

JNI

  • Do you know about JNI
  • How to load the NDK library? How to register Native functions in JNI?
  • What functionality have you implemented with JNI? How do you do that? (Encryption, audio and video, graphics and image processing)

Design patterns

  • Talk about MVC, MVP, and MVVM. What’s good and what’s bad?
  • After encapsulating the P layer, how to solve the problem if the p layer data is too large?
  • Can you give some examples from Android of what design patterns are used?
  • What are the differences between decorator mode and proxy mode?
  • .

2. The Android into order

  • How do you unit test, how do you keep your App stable?
  • How to check the recycle status of an object in Android?
  • How is the size of Apk compressed?
  • How do I configure multichannel packages using Gradle?

  • Analysis of plug-in principle
  • Principle of componentization
  • Cross component communication
  • Realization of route and buried point in componentization
  • Hook and pile insertion technology
  • Android signature mechanism?
  • .

The fourth chapter Kotlin&Flutter

  • Can you use Kotlin, Fultter? Talk about your understanding
  • Differences between Kotlin and Java
  • Tell me about Kotlin’s partner
  • Please briefly introduce the Flutter framework and its advantages and disadvantages.

  • Introduce the conceptual architecture of Flutter
  • Introduce the FrameWork and Engine layers of Flutter and their functions
  • This section describes the concepts of Widget, State, and Context
  • The life cycle of StatefulWidget
  • Describe the relationships between Widgets, RenderObjects, and Elements
  • Describe the drawing process of Flutter
  • Describe the thread management model of Flutter

Android architecture advanced chapter :(combat)

1.360° Full performance tuning

  • Design ideas and code quality optimization
  • Program performance optimization
  • Memory optimization
  • Optimize the power consumption
  • Network transmission and data storage optimization
  • Optimization of development efficiency

2. Interpret open source framework for design ideas

  • Thermal repair design
  • Plug-in framework design
  • Component frame design.
  • Image loading frame
  • Network access framework design
  • RXJava responsive programming framework design
  • IOC Architecture Design
  • Android architecture component Jetpack

3.NDK module development

4. The Flutter in order

conclusion

What is an interview? Bloggers who understood the interview, it is a process, is constantly precipitation, constantly summarize and communicate their own professional field of technology and the process of problem solving skills, have a big dream in the heart of every programmer, ali and tencent, for the programmer’s technical requirements are relatively high, despite the record of formal schooling, Does your technical level meet ali’s standards and requirements?

So, whether you want to get into a big company or have a good salary, you need to take yourself seriously. The above notes on the growth of Android technology, I can provide to you for free, I hope that when I help you, you also take the initiative to help yourself.

All the information mentioned in the article is free to share with you, if you need partners can be in myGitHubGet it for free!

Quick Access: Download it here! Sincerity full!!

Learn more about Android:Shimo. Im/docs / 9 PWDKR…

Sorting is not easy, feel helpful friends can help like share support small series ~