2020 Meituan Android Interview (with a full set of real interview questions analysis)

Preface

These questions are the questions asked by netizens when they went to interviews with first-line Internet companies such as Meituan. The author collects and organizes from my own interview experience and major network social technology platforms. Familiarity with the knowledge points listed in this article will greatly increase the probability of passing the first two rounds of technical interviews.

Mainly divided into the following parts:

(1) Android interview questions

(2) Java interview questions

(3) Interview questions for advanced development techniques

1. Android interview questions

Android interview questions include Android basics, as well as some source-level, principles, etc. So if you want to go to Meituan for an interview, you must look at the source code and implementation methods. For common frameworks, you can try to implement it by hand and exercise yourself.
(1) Android basic knowledge points

  • What are the four major components
  • The life cycle and simple usage of the four major components
  • Communication between activities
  • Activity life cycle in various situations
  • When switching between horizontal and vertical screens, the life cycle of Activity in various situations
  • Life cycle comparison between Activity and Fragment
  • The life cycle when the Home button is pressed when there is a Dialog on the Activity
  • Which methods must be executed when jumping between two activities?
  • The foreground switches to the background, and then back to the foreground, the Activity life cycle callback method. Pop up Dialog, life value cycle callback method.
  • Comparison of the four startup modes of Activity
  • Activity state is saved and restored
  • Life cycle of fragment in various situations
  • Fragment state preservation startActivityForResult is a method of which class and under what circumstances?
  • How to realize the sliding of Fragment?
  • How to transfer data between fragments?
  • How is Activity bound to Service?
  • How to start the corresponding Service in Activity?
  • How do service and activity exchange data?
  • How to open the service
  • Please describe the life cycle of Service
  • Talk about your understanding of ContentProvider
  • Talk about the relationship between ContentProvider, ContentResolver, ContentObserver
  • Please describe the understanding of broadcasting BroadcastReceiver
  • Broadcast classification
  • Ways and scenarios of broadcasting
  • How to register and use BroadcastReceiver in manifest and code?
  • What is the difference between local broadcast and global broadcast?
  • BroadcastReceiver, LocalBroadcastReceiver classification
  • AlertDialog, popupWindow, Activity difference
  • The difference between Application and Activity Context object
  • Android attribute animation characteristics
  • How to import an external database?
  • Features and comparison of LinearLayout, RelativeLayout, FrameLayout, and introduces the usage scenarios.
  • Talk about the understanding of interfaces and callbacks
  • The principle of callback
  • Write a callback demo
  • Introduce SurfView
  • Use of RecycleView
  • The role of serialization, and the difference between the two Android serialization
  • Differential
  • Estimator
  • Data storage method in Android
    Android basic knowledge points

(Two) Android source code related analysis

  • Android animation framework implementation principle
  • The difference between Android versions of API
  • The difference and connection of Requestlayout, onlayout, onDraw, DrawChild
  • The difference and use of invalidate and postInvalidate
  • The difference between Activity-Window-View
  • Talk about the understanding of Volley
  • How to optimize custom View
  • How does the low version SDK implement the high version api?
  • Describe the flow of a network request
  • HttpUrlConnection and okhttp relationship
  • Understanding of Bitmap objects
  • looper architecture
  • The working principle of ActivityThread, AMS, WMS
  • How does custom View consider model adaptation
  • Custom View events
  • What is the difference between AstncTask+HttpClient and AsyncHttpClient?
  • LaunchMode application scenarios
  • How to use AsyncTask?
  • SpareArray principle
  • Please introduce how ContentProvider realizes data sharing?
  • Several ways of communication between AndroidService and Activity
  • What is the principle and function of IntentService?
  • Talk about the relationship between Activity, Intent, and Service
  • The difference between ApplicationContext and ActivityContext
  • Is the SP process synchronized? Is there any way to achieve synchronization?
  • Talk about the use of multithreading in Android
  • Process and Application life cycle
  • How to know the size of the view when encapsulating the View
  • Principle of RecycleView
  • The role and understanding of AndroidManifest
    Android source code analysis
    (three) some common principle problems
  • Handler mechanism and underlying implementation
  • The difference between Handler, Thread and HandlerThread
  • The handler sends a message to the child thread, how does the looper start?
  • Regarding Handler, where is the new Handler thread?
  • ThreadLocal principle, implementation and how to ensure the Local attribute?
  • Please explain the relationship between Message, Handler, Message Queue, Looper in the single-threaded model
  • Please describe the View event delivery and distribution mechanism
  • Touch event delivery process
  • What is the difference between onTouch and onTouchEvent in event distribution, and how to use it?
  • What are the callback methods related to event distribution in View and ViewGroup respectively
  • View refresh mechanism
  • View drawing process
  • Principles of Custom Controls
  • How does a custom View provide an interface for obtaining View properties?
  • Realize WAP mode networking in Android code
  • AsyncTask mechanism
  • AsyncTask principles and shortcomings
  • How to cancel AsyncTask?
  • Why can't I update the UI in the child thread?
  • What is the reason for ANR?
  • ANR positioning and correction
  • What is oom?
  • What causes oom?
  • Is there any solution to avoid OOM?
  • Can Oom try catch? why?
  • What is a memory leak?
  • What causes the memory leak?
  • How to prevent thread memory leaks?
  • Solution to memory leak field
  • Difference between memory leak and memory overflow?
  • LruCache default cache size
  • ContentProvider's permission management (answer: read-write separation, permission control-accurate to the table level, URL control)
  • How to intercept and abort a text message via broadcast?
  • Can the broadcast request the network?
  • What is the time limit for broadcasting to cause anr?
  • Calculate the nesting level of a view
  • Activity stack
  • Is there an upper limit for Android threads?
  • Is there an upper limit for the thread pool?
  • Why does Android introduce Parcelable?
  • Have you tried to simplify the use of Parcelable?

Two, Java interview questions

Proficiency in java is very important. Large companies not only require you to use several APIs, but also require you to be familiar with the principles of source code implementation, and even to know what are the shortcomings, how to improve, and some algorithms related to java. , Design patterns and so on.
**(1) Java **

  • The difference between HashMap and HashTable and CurrentHashMap.
  • The difference between synchronized and volatile, ReentrantLock, CAS.
  • JVM class loading mechanism, garbage collection algorithm comparison, Java virtual machine structure, etc.
  • Four references to Java
  • Java's generics, the difference between <? super T> and <? extends T>.
  • What are the statuses of Java threads, what locks are there, and the difference between various locks.
  • The difference between final, finally and finalize.
  • The difference between interface and abstract class.
  • The difference between sleep, wait and yield, how does the thread of wait wake it up?

Three, advanced development technical interview questions

1. Picture

1、图片库对比
2、LRUCache原理
3、图片加载原理
4、自己去实现图片库,怎么做?
5、Glide源码解析
6、Glide使用什么缓存?
7、Glide内存缓存如何控制大小?

image

** Two, network and security mechanism **

1.网络框架对比和源码分析
2.自己去设计网络请求框架,怎么做?
3.网络请求缓存处理,okhttp如何处理网络缓存的
4.从网络加载一个10M的图片,说下注意事项
5.TCP的3次握手和四次挥手
6.TCP与UDP的区别
7.TCP与UDP的应用
8.HTTP协议
9.HTTP1.0与2.0的区别
10.HTTP报文结构
11.HTTP与HTTPS的区别以及如何实现安全性
12.如何验证证书的合法性?
13.https中哪里用了对称加密,哪里用了非对称加密,对加密算法(如RSA)等是否有了解?
14.client如何确定自己发送的消息被server收到?
15.谈谈你对WebSocket的理解
16.WebSocket与socket的区别
17.谈谈你对安卓签名的理解。
18.请解释安卓为啥要加签名机制?
19.视频加密传输
20.App 是如何沙箱化,为什么要这么做?
21.权限管理系统(底层的权限是如何进行 grant 的)?

The internet

Three, the database

1.Sqlite升级,增加字段的语句
2.数据库框架对比和源码分析
3.数据库的优化
4.数据库数据迁移问题

database

Fourth, plug-in, modularization, componentization, hot fix, incremental update, Gradle

1.对热修复和插件化的理解
2.插件化原理分析
3.模块化实现(好处,原因)
4.热修复、插件化
5.项目组件化的理解
6.描述清点击 Android Studio 的 build 按钮后发生了什么

image

Five, architecture design and design patterns

1.谈谈你对Android设计模式的理解
2.MVC MVP MVVM原理和区别
3.你所知道的设计模式有哪些?
4.项目中常用的设计模式
5.手写生产者/消费者模式
6.写出观察者模式的代码
7.适配器模式,装饰者模式,外观模式的异同?
8.用到的一些开源框架,介绍一个看过源码的,内部实现过程。
9.谈谈对RxJava的理解
10.Rxjava发送事件步骤
11.RxJava的作用,与平时使用的异步操作来比的优缺点
12.说说EventBus作用,实现方式,代替EventBus的方式
13.从0设计一款App整体架构,如何去做?
14.说一款你认为当前比较火的应用并设计(比如:直播APP,P2P金融,小视频等)
15.谈谈对java状态机理解
16.Fragment如果在Adapter中使用应该如何解耦?
17.Binder机制及底层实现
18.对于应用更新这块是如何做的?(解答:灰度,强制更新,分区域更新)?
19.实现一个Json解析器(可以通过正则提高速度)
20.统计启动时长,标准

image

Six, performance optimization

1.启动 app 黑白屏优化
2.稳定——内存优化
3.流畅——卡顿优化
4.节省——耗电优化
5.安装包——APK 瘦身
6.冷启动与热启动
7.内存泄漏的场景和解决办法
8. Bitmap 优化
9.LRU 的原理
10.webview 优化
11.如何避免 OOM?
...

Performance optimization

**七、Android Framework **

1.Android 系统架构
2.View 的事件分发机制?滑动冲突怎么解决?
3.View 的绘制流程?
4.跨进程通信
5.Android 系统启动流程是什么?
6.启动一个程序,可以主界面点击图标进入,也可 以从一个程序中 跳转过去,二者有什么区别?
7.AMS 家族重要术语解释
8.用到的一些开源框架,介绍一个看过源码的,内部实现过程。
...

Android Framework

Eight, Android excellent tripartite library source code

1.网络底层框架:OkHttp 实现原理
2.网络封装框架:Retrofifit 实现原理
3.响应式编程框架:RxJava 实现原理
4.图片加载框架:Glide 实现原理
5.事件总线框架:EventBus 实现原理
6.内存泄漏检测框架:LeakCanary 实现原理
7.依赖注入框架:ButterKnife 实现原理
8.依赖全局管理框架:Dagger2 实现原理 
9.数据库框架:GreenDao 实现原理

image

Resume + social recruitment solution + classic HR interview analysis

The above is the analysis of the real questions encountered in the Meituan interview. I hope it will be helpful to everyone. At the same time, many people often encounter many interview questions about resume production, career confusion, and HR classic interview questions. Similarly, I also collected and compiled a full set of resume production, the puzzle of recruitment by the Golden Three Silver Four Clubs, and HR interviews. If you have any questions, I can provide professional answers.

image

How to do a good job interview surprise and plan the learning direction?

The interview question set can help you find out and fill up the vacancies, have a direction and targeted learning, and prepare for future entry into a large factory. But if you just read it again, don't study and delve into it. Then this interview question will be of limited help to you. In the end, we must rely on senior technical level to speak.

There are a lot of materials for learning Android on the Internet, but if the knowledge learned is not structured, and when you encounter a problem, you just taste it and don’t study it in depth, then it is difficult to achieve real technological improvement. It is recommended to make a learning plan first, and link the knowledge points according to the learning plan to form a systematic knowledge system.

The learning direction is easy to plan, but if you only learn through fragmented learning, it is very slow to improve yourself.

At the same time, I also collected and sorted out ByteDance in 2020, as well as interview questions from companies such as Tencent, Ali, Huawei, Xiaomi, etc., and sorted out the requirements and technical points of the interview into a large and comprehensive "Android Architect" interview Xmind (in fact, better than Expected to spend a lot of energy), including the knowledge context + branch details .

image

When building these technical frameworks, I also organized the system's advanced advanced tutorials, which will be much better than your own fragmented learning effect.

image

There are a lot of materials for learning Android on the Internet, but if the knowledge learned is not structured, and when you encounter a problem, you just taste it and don’t study it in depth, then it is difficult to achieve real technological improvement. I hope that this systematic technical system will provide you with a direction reference.

All the content is compiled into PDF by me, and interested friends (collected by Github ) PDF information

Guess you like

Origin blog.csdn.net/AndroidAlvin/article/details/107836741