当前位置:网站首页>Master this set of refined Android advanced interview questions analysis, oppoandroid interview questions

Master this set of refined Android advanced interview questions analysis, oppoandroid interview questions

2022-07-07 16:43:00 InfoQ

start

Everybody knows , It's hard to get a high salary when looking for a job , Most people can take  30k  Of  offer  Pretty good . As far as I know, 90% of Android Development is all about 30k following !?

But there is a classmate in my group , I usually like to study the source code and framework , Then after a month's question brushing , Jump to the headlines , Got it  50k  Monthly salary , I think it's great , Envy, jealousy, hate .??

Then I talked to him , I found that his skill is really good , During the question brushing , Besides algorithms , He also put his  Android  Take out the notes , It's all his usual accumulation , comprehensive , Depth also has , Plug in 、 Dependency injection , And all kinds of architecture knowledge .??

Sure enough , As long as the technology is good , I'm not afraid to go anywhere . When we are studying , Besides reading books and blogs , It's best to find a systematic , And have enough in-depth learning video learning , Build your own knowledge framework .??

Android Develop several parts of the interview

1、 Basic knowledge of

The basics include several parts :Java(JDK、JVM)、Android、 Data structures and algorithms 、 Fundamentals of computer 、 Design patterns , Some will ask Flutter.

null
Java part

I don't recommend this part. Just read the blog , Because many blogs are not systematic or complete , It is recommended to read it completely 《 In depth understanding of Java virtual machine 》 This book , Basically, it covers JVM All relevant interview questions , Including memory partitions 、GC Mechanism 、 Memory model 、 lock 、 Bytecode 、 Class loading, etc .JDK The part will be more miscellaneous , Basically, it can be classified into several : Containers ( Must ask HashMap、CurrentHashMap、ArrayList etc. )、 Thread pool ( Must ask )、 annotation 、 Synchronization tool 、 A dynamic proxy 、notify/wait/sleep. This part can be seen from some JDK Sort it out in relevant articles .

Android part :

What must be asked in this part is Handler Mechanism 、 Touch event delivery 、 Four components start process 、View Drawing process 、Binder Mechanism 、 Life cycle
. Classic questions such as :

  • The touch event must be passed to Activity Then pass it on to View The? ?
  • If you want to in Application Of onCreate Execute some logic before the lifecycle , Where can I put it ?
  • draw、onDraw、dispatchDraw What is the order of execution ?
  • View The real display is in onResume Before or after ?
  • Activity There is a nested Fragment,startActivity after ,Activity and Fragment What is the life cycle sequence of ?

Data structure and algorithm :

The proportion of this part will be smaller in client development , However, many companies attach great importance to handwritten code . Frequently encountered problems are binary tree traversal 、 Ordered two-dimensional array lookup , Sort, etc , Basically with 《 The finger of the sword offer》 perhaps 《 The beauty of programming 》 That's fine .

Fundamentals of computer :

This part covers more miscellaneous , For example, computer network (7 Layer network model 、Http and Https)、git Workflows and commands 、 Computer cache policy 、UML、 Information security, etc .

Design patterns :

In your own project, you must summarize and use more design patterns , When the interviewer asks what design patterns you have used , If you can answer, such as state mode 、 Responsibility chain 、 Decoration, etc , It will certainly add a lot of points . If you just answer the singleton and builder mode , That would be much worse . This part is recommended to see 《 Grinding design mode 》.

Open source project :

This is also one of the necessary questions , It is recommended to start with the open source projects used in your own projects , Follow the code , Draw a flow chart and architecture diagram , Carefully understand the advantages and disadvantages of this design .

such as OkHttp、LeakCanery wait , These are all fine . Open source projects vary according to the interviewer's personal experience , The depth of the question is also different , At this time, you need some personal guidance skills , For example, the interviewer may not be very familiar with this framework , At this time, you can actively express some details of the design , It can also leave a good impression on the interviewer .
Never write a framework that has only been used but has not seen the source code on your resume .

null

Key project experience

Projects in small factories often pursue rapid iterative business on-line , Relatively tolerant of some technical difficulties , But these
Technical difficulties are often those that can reflect a person's technical ability
. So if you're in a small factory , You can't get too involved in the business , We must jump out and find some bright technical points , Do a good job . These technical points are the capital for a programmer to settle down , Otherwise the company's business will be in trouble , Your value will no longer exist . In how to prepare for an interview, this part of the project , Xiaobian has some experience :

Divided into three parts :

  • Why do you do this ,
  • What factors are considered and how are they done ,
  • What effect has been achieved ( For example, the starting speed is from 1000ms drop to 200ms, This specific data )

You can string a few dots together , This can be more systematic and comprehensive , For example, the combination of code optimization and performance optimization .

Some optimization points of small factories can only do the most cost-effective part , At this time, we can also talk about what better solutions there are in the industry

You'd better prepare again “ If you don't quit, what are the deficiencies and areas that can be optimized in the project ?”( The author has encountered such problems several times during the interview )

** Small factories jump to big factories , The technical foundation can be well prepared , But the project is definitely a weakness .** A big factory App There may be dozens or hundreds of people doing , Many so-called optimization in small factories may have been done by interviewers in large factories for a long time , At this time, what the project itself has done is not too important , It needs to focus on your idea of solving problems and that you are a aspiring programmer , At least you should be able to achieve the average level of the industry , In order to have a chance to pass the interview .

Beyond technology

The part other than technology is also a very important part in the interview of large factories , This part is mostly some soft skills :

Self drive and pursuit

This part mainly focuses on some self driven learning and independent pursuit of some technical abilities in daily work , Not just  
《Android Summary of learning notes + Latest mobile architecture video + Big Android interview questions + Project actual combat source code handout 》 Free open source Hui Xin search official account 【 Advanced programming 】
  It is enough to complete the requirements , In this way, you can reflect your personal growth and potential .

Communication and collaboration

This section will assess your future integration into the team and your ability to collaborate and communicate with the team across teams . For example, whether you can correctly view and solve some cross departmental communication problems at work .

My face to face summary

It is mainly divided into four aspects :

Android

  • Android Features of each version ( for example 6.0, Dynamic permissions )
  • ANR Why
  • Android The way and comparison of inter process communication in
  • AsyncTask Implementation principle, advantages and disadvantages of
  • Handler Mechanism
  • Customize view Trilogy , technological process ( Or the actual scene , For example, implement a dial , How do you do it? )
  • FrameWork hierarchy
  • Activity Life cycle (A Jump to B,A and B The execution sequence of the life cycle in )
  • Dvlik、ART、JVM The difference between the three virtual machines
  • Can you be in Africa UI Thread update UI
  • Service and IntentService The difference between
  • Thread and HandlerThread The difference between
  • Touch Event distribution mechanism
  • How do you know a Activity Whether there was a leak
  • Click on a from APP What happened to the icon
  • Activity Start process ( Look at the source code , Just say it roughly )
  • Activity Boot mode ( Four kinds of )
  • Intent start-up Activity The way
  • onStart and onResume The difference between
  • LruCache And how it works
  • Android Medium MVC、MVP、MVVM The difference and connection
  • Parcelable and Serializable The difference between
  • Service Life cycle
  • Service Startup mode and difference of
  • Binder Mechanism
  • onSaveInstanceState and onRestoreInstanceState When to call ( You need to understand , There is usually a scene for you to judge )
  • onNewIntent When to call ( ditto )
  • Android Performance optimization and memory optimization in
  • RxJava The way ( Common operators , Back pressure , Thread switching principle , The practical application )
  • RxAndroid The way
  • EventBus principle
  • Volley principle
  • OkHttp principle
  • Retrofit principle
  • RxJava and Retrofit combination
  • Dagger2 principle
  • Let's introduce componentization ( Why there should be componentization , How to resolve merge conflicts )
  • Quickly introduce
  • Common methods of screen adaptation
  • Service、 Process keeping alive
  • Glide principle
  • AsyncTask principle
  • SurfaceView And the general View The difference between
  • Implementation principle of dependency injection framework
  • Git project management
  • What is L3 cache

Java

  • Common design patterns ( Master common about 10 Plant on Ok)
  • ThreadLoal Function and principle of
  • Implementation mode and principle of thread
  • State of thread , How to create threads , Transition between thread states ( For example, when a thread changes from running to blocking )
  • State of process
  • transient The role of keywords
  • sleep() and wait() The difference between
  • hashcode() The role of methods
  • == and equals() Method difference ( Why rewrite equals() Methods have to be rewritten hashcode Method )
  • Java Three characteristics of
  • The difference between interface and abstract class
  • Difference between process and thread
  • Meaning of thread pool parameters , And four common thread pool application scenarios
  • Characteristics, principles and application scenarios of blocking queue
  • yield() The role of methods
  • The type of multithreaded lock ,ReentrantLock,Lock,synchrnoized Keywords, etc
  • volatile The role of keywords ( Role in single case )
  • The concept of closures
  • Generic ( What is type erasure , Why generics )
  • Lock optimization method ( spinlocks 、 Adaptive spin 、 Lock elimination 、 Lock coarsening 、 Biased locking )
  • Class execution order
  • StringBuffer and StringBuilder The difference between
  • HashMap Implementation principle of ( It is best to 1.8 Before and 1.8 After that, you should know )
  • ConcurrentHashMap Implementation principle of ( Same as 1.8 Know before and after )
  • ArrayList and LinkedList The difference between
  • Java Memory area ( The difference between heap and stack , What is a runtime constant pool )
  • Packing and unpacking
  • OOM abnormal
  • GC Mechanism (GC Area , How to judge whether an object can be recycled ,GC Algorithm ,GC Strategy )
  • Class loading mechanism ( Class loading process parent delegation model )
  • Java Memory model ( Main memory and working memory )
  • Atomicity (AtomicInteger principle )、 visibility (volatile keyword )、 Orderliness , How to ensure
  • Antecedent principle (happens-before principle )
  • Thread safe implementation method
  • The type of lock ( Pessimistic locking , Optimism lock CAS Algorithm , Fair lock , How to realize unfair lock )
  • StringBuffer and StringBuilder difference
  • annotation ( Custom annotation )
  • The concepts and differences of four kinds of references

computer network

  • HTTP agreement ( Head structure , Several request methods , Caching mechanisms , The difference between the versions )
  • HTTPS agreement , and HTTP The difference between agreements , The process of key agreement ,SSL Mechanism
  • Symmetric and asymmetric encryption
  • TCP and UDP The difference between
  • TCP Three handshakes of 、 Four waves ( Including status code , And why wait after four waves 2*TIME_WAIT)
  • TCP congestion control mechanism
  • TCP Sliding window mechanism
  • TCP Timeout retransmission mechanism
  • DNS agreement
  • Five layer network model ( The physical layer , Data link layer , The network layer , Transport layer , application layer )
  • IP Head
  • Enter a web address in the browser address , What happened?

Data structure and algorithm

  • Linked list ( One way linked list , Double linked list )
  • Array ( Rotated array )
  • queue ( deque , Blocking queues )
  • Stack
  • Pile up ( Big root pile 、 Heap )
  • Binary tree ( Perfect binary tree 、 Full binary tree 、 Binary sort tree 、 Balanced binary trees , Red and black trees )( Depth traversal , Sequence traversal )
  • chart ( Focus on the depth first traversal and breadth first traversal of the graph )
  • Seven sorting algorithms ( Bubbling , choice , Insert , Merge sort , Quick sort , Heap sort , Shell Sort )
  • The finger of the sword offer Algorithm problem on ( Be able to compare directories , Look at the title , Can have ideas , Just ok)
  • Two points search
  • Two stacks implement a queue , Two queues implement a stack
  • Massive data sorting
  • topK problem , Yes 1 Tens of millions , How to quickly find the biggest 100 individual
  • Merge two ordered arrays , Merge two ordered lists
  • Young's matrix ( Horizontal increment , Increasing vertically ) How to find the specified number in
  • Flip a sentence , for example I am 3 years old, After flipping ,old years 3 am I
  • Yes 10 Billion data , Now only 200M Memory , How to find this 10 The most frequent of 100 million data 100 Data

Last

Share one NDK Basic development data

null
The shared content includes but is not limited to advanced UI、 performance optimization 、 Architect course 、NDK、 Hybrid development (ReactNative+Weex) Wechat applet 、Flutter Wait for everything Android Advanced practical technology ; I hope I can help you , It also saves time for people to search information on the Internet to learn , You can also share the news with your friends !
原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071443222616.html