For you to sort out the most complete, the most complete one or two interview questions. This article will show you the directions for Android and Java, followed by python and Kotiln interview questions!

Preface:

Some time ago, ACCORDING to the feedback, there are not as many Android jobs as before and it is not so easy to find them. Facing the winter season of 2016, a large number of companies imitate O2O model, leading to the death of many enterprises. In addition, training institutions have a large number of trainers, resulting in oversupply, which does not mean saturation. It’s just that the market is more reasonable (as long as the technology is good). Recently combined with some interview students and cattle (Zhang Xutong) feedback, a few days ago to listen to tong ge went to Ali interview incidentally sorted out some interview topics. Hope to help you, the post will continue to update to add new interview questions. I can help you find out. The following is a compilation of interview questions from alibaba, Tencent, Baidu, Huawei, JD.com, Sogou and Didi.

Even if write the answer is not necessary (I wrote part of the interview answer), because the development and the actual answer will be different, moreover afraid of misleading everyone, so these interview answers or to understand it! Remember: don’t memorize answers, understand more.

Android based

  • 1. What is ANR and how to avoid it?

  • If a time-consuming operation requires the user to wait, a progress bar can be displayed on the interface.

  • 2. View drawing process; Custom View how to consider the model adaptation; Custom View events

  • 3. Distribution mechanism; View and ViewGroup have what event distribution related callback methods; Custom View how to provide access to View attributes interface;

  • 4. Comparison between Art and Dalvik; Principles of virtual machines, how to design a virtual machine (memory management, class loading, parent delegation); JVM memory model and class loading mechanism; Circular reference and avoidance of memory objects;

  • 4. DDMS and traceView;

    5. Memory reclamation mechanism and GC algorithm (advantages and disadvantages of various algorithms and application scenarios); GC principle, timing and GC objects; Memory leak scenarios and solutions;

  • 6. Four components and life cycle; ContentProvider permission management (read/write separation, permission control – down to table level, URL control); Compare the four startup modes of the Activity; The Activity state is saved for recovery;

  • 7. What is AIDL and how to use it

  • 8. Explain the relationship between Message, Handler, Message Queue, and Looper in the single-threaded model.

  • Fragment life cycle; Fragment state Stores which class method startActivityForResult is used in which case, and how to decouple it if used in Adapter.

  • 10. Principle and deficiency of AsyncTask; NtentService principle;

  • 11. How to bind an Activity to a Service, and how to start its own corresponding Service in the Activity;

  • 12. Describe the Service lifecycle.

    AstncTask+HttpClient and AsyncHttpClient

  • How to ensure that a background service is not killed; What is the way to save electricity;

    How to intercept and abort a short message through broadcast; Whether the broadcast can request network; Broadcast induced anR time limit;

  • 16. Interprocess Communication, AIDL;

  • 17, What is the difference between onTouch and onTouchEvent in event distribution, and how to use it?

  • ContentProvider (ContentObserver) ContentResolver (ContentObserver)

  • 19. Please introduce how ContentProvider implements data sharing.

  • Handler mechanism and underlying implementation;

  • 21. Binder mechanism and underlying implementation;

  • 22, ListView image mismatch problem is how to produce;

  • 23. How to register and use BroadcastReceiver in manifest and code

  • What is the relationship between an Activity and an Intent and a Service?

  • The difference between ApplicationContext and ActivityContext

  • 26. Calculation of the memory occupied by a Bitmap;

  • 27, Serializable and Parcelable difference;

  • 28, Describe the BroadcastReceiver;

  • 29. Describe the Android event distribution mechanism.

  • 30. Please introduce NDK;

  • 31, what is the NDK library, how to register native functions in JNI, there are several ways to register;

  • How to use AsyncTask;

  • 33, What is done with the application update section? (grayscale, mandatory update, regional update);

  • 34, mixed development, RN, WEEX, H5, small program (do Android to understand some front-end JS is still very good);

  • Under what circumstances will lead to memory leaks;

  • 36. How to analyze and optimize the performance of Android applications;

  • 37. Name and design an APP that you think is currently popular (live streaming APP);

  • OOM to avoid exceptions and solutions;

  • What are the processing skills of screen adaptation?

  • 40. What methods must be executed when two activities jump between?

  • Okhttp principle

  • Rxjava usage and principles

  • 42, what is the hot update technology, know the principle!

  • 43. Start the Activity process

  • 44, Android memory management

  • 45. Android permission management

  • Take a look at the new 7.0 features

  • Tell me about the structure of your project

  • Componentization and specific implementation plan

  • 49. Memory leak detection method

  • 50, Http protocol, SSL handshake mechanism.

Java based

  • 1. Collection class and collection framework; Implementation principle of HashMap and HashTable, thread safety, hash conflict and processing algorithm; ConcurrentHashMap.

  • 2. The difference between processes and threads.

  • 3. Java concurrency, multi-threading, threading model;

  • 4. What is a thread pool and how to use it?

  • A: Thread pool is to put multiple thread objects into a container in advance. When used, it is not necessary to use new threads but directly to get threads from the pool, which saves the time to open child threads and improves the efficiency of code execution.

    5. How to ensure data consistency; Synchronized keywords, class lock, method lock, reentrant lock;

    6. What is the mechanism for implementing polymorphism in Java?

  • How to serialize a Java object to a file

    8. What is your understanding of Java reflection?

  • A: Reflection in Java is first able to get the bytecode of the Java Class to be reflected. There are three ways to get the bytecode: 1. Class.forname (className)

  • 2. The name of the class. The class

  • 3. This. GetClass ().

  • Then, the methods, variables and constructors in bytecode are mapped into corresponding classes such as Method, Filed and Constructor, which provide a wealth of methods that can be used by us.

  • 4. Method of synchronization; Multi-process development and multi-process application scenarios;

    5. Differences between Wait and SEelp in Java

  • A: The biggest difference is that while wait releases the lock, sleep holds it all the time. Wait is usually used for interthread interactions, and sleep is usually used to pause execution.

  • The role of synchronized and volatile keywords;

  • A:

  • 1) It ensures visibility when different threads operate on the variable, i.e. one thread changes the value of a variable and the new value is immediately visible to other threads.

  • 2) Forbid instruction reordering.

  • Volatile essentially tells the JVM that the value of the current variable in the register (working memory) is indeterminate and needs to be read from main memory; Synchronized locks the current variable so that only the current thread can access it and other threads are blocked. 1. Volatile can only be used at the variable level; Synchronized can be used at the variable, method, and class levels. 2. Volatile only enables variable change visibility, and does not guarantee atomicity; Synchronized ensures the visibility and atomicity of variable changes. 3. Volatile does not cause thread blocking; Synchronized can cause threads to block. 4. Volatile variables are not optimized by the compiler; Variables of the synchronized tag can be optimized by the compiler

  • 6, the server only provides the data receiving interface, in multi-thread or multi-process conditions, how to ensure the orderly arrival of data;

  • 7. Principle of ThreadLocal, implementation and how to ensure Local properties;

    /8, StringBuilder StringBuffer;

    9. What design patterns do you know?

  • A:

  • There are generally believed to be 23 design patterns in Java. We don’t need all of them, but there are a few common design patterns that we should learn. All design patterns are listed below. The design patterns that need to be mastered are listed separately, as many as possible. Generally speaking, design patterns can be divided into three categories: creation patterns, including five: factory method patterns, abstract factory patterns, singleton patterns, builder patterns, and prototype patterns. Structural mode, a total of seven: adapter mode, decorator mode, agent mode, appearance mode, bridge mode, composite mode, share mode. There are eleven behavioral modes: strategy mode, template method mode, observer mode, iteration sub-mode, responsibility chain mode, command mode, memo mode, state mode, visitor mode, intermediary mode, interpreter mode.

  • 10. How Java calls C and C ++ languages;

  • Interface and callback; The principle of callback; Write a callback demo;

  • 12. Generics principle, illustrated by examples; Parsing and dispatching;

  • 13. The difference between abstract classes and interfaces Application scenarios; Can abstract classes be without methods and attributes?

  • Can static properties and methods be inherited? Can it be rewritten? And why?

  • Change the signature of the equals method of object A, which equals method will be called when using HashMap to store the object instance.

  • 16. Tell me what you know about generics.

  • 17. Java exception system;

  • How to control the number of concurrent access threads allowed by a method

    19, the difference between dynamic proxy, what scenario to use;

  • 20. Dex loading process and optimization method

  • Jvm and Gc mechanisms

  • 22. Common design patterns

Data structures and algorithms

  • 1. What is the difference between heap and stack in memory (data structure and actual implementation)?

    2. What is the fastest sorting algorithm? Which algorithm should be chosen to rank alibaba’s more than 20,000 employees by age? The difference between heap and tree; Write fast typesetting code; List reverse code;

    3. Find daffodils within 1000 and daffodils within 4 billion;

    4. Substring inclusion problem (KMP algorithm) code implementation;

    5, how to find the difference set C between A and B,(Bit mapping -> Hash grouping -> multi-file read and write efficiency -> disk addressing and application layer optimization for addressing)

  • 6 ant colony algorithm and Monte Carlo algorithm;

    7, write down the sorting algorithm you know and space-time complexity, stability;

    8. How to try to find the nearest merchant function in Baidu POI (coordinate mirror +R tree).

  • 9. Traverse the binary tree

  • 10, their collection to implement a queue

  • Implement thread-safe classes yourself

  • Quicksort and bubbling sort, how to convert.

other

  • 1. Four necessary conditions for deadlocks;

    2. Common coding methods; Chinese in UTF-8 encoding takes up several bytes; Int a few bytes;

    3. Implement a Json parser (speed up with regex);

  • 4. MVC MVP MVVM; Common design patterns; Write code for observer mode;

  • 5. TCP’s three-way handshake and four-way wave; Differences between TCP and UDP;

  • 6. HTTP protocol; Differences between HTTP1.0 and 2.0; HTTP packet structure;

  • 7. The difference between HTTP and HTTPS and how to achieve security;

  • 8. What frameworks and platforms have you used?

    9. Which custom controls have been used?

    10. Tell me about some projects you have worked on.

Summary of non-technical issues

  • 1. What are the in-depth research fields?

  • 2. What are the channels of attention to industry information?

  • 3. What books have you read recently?

  • 4. Technical areas and points in which you are best at and most interested;

  • 5. Which open source libraries are used in the project, and how to avoid security and stability problems caused by the introduction of open source libraries;

  • 6. What did you do during the internship and what output did you produce?

  • 7. How to divide 5 coins, 2 positive and 3 negative into two piles and then transfer the same number of hard 8 coins with heads up and coins with tails up in the two piles;

  • 8, clockwise go around, hour minute hand overlap several times;

  • 9. N by N square paper, how many squares are there;

  • 10, now the download speed is very slow, try to analyze the reason from the perspective of network protocol, and optimize (the network of 5 layers can be involved).

HR Problem Summary

  • 1. Why did you leave your previous company?

  • Tell me something that impressed you most.

  • 3. Tell me about a project that has had the greatest impact on you.

  • 4. Introduce your favorite field of expertise;

  • 5. What is the biggest harvest from the internship?

  • 6. What will you do when you disagree with your superiors?

  • 7. What are your strengths and weaknesses? And give some examples?

  • 8. What is your learning method? How do you learn during the internship? What are the biggest difficulties encountered in the internship program and how to solve them?

  • Say one thing that best proves your ability;

  • What do you think you lack for the position you apply for?

  • What would you do if you are hired by our company after this interview, but you find that you are not suitable for this position after some time of work?

  • 14. What was the biggest difficulty in the project? How to solve;

  • Your career plans and personal goals; Future development route and job positioning;

  • What will you do if you are not hired in this interview?

  • Evaluate yourself, evaluate your technical level, personal code amount;

  • 18, through what channels to know recruitment information, other students have invested in which companies;

  • What are your hobbies in your spare time?

  • What have you done the most proud of yourself;

  • If you want to send a classmate to go abroad to the airport in the evening, but the unit has something to do with you, how do you do;

  • What do you think you lack for the position you apply for?

  • 23. Current offer status; If BATH gave the offer how to choose;

    What do you value more in a job? Platform, technology, atmosphere, city, Money;

  • Ideal salary range; Hangzhou post and Beijing post choose which;

    What is the ideal working environment;

  • Talk about your views on job-hopping;

    Tell us your opinion on the industry and technology development trend;

  • 29. What is worth learning from colleagues/classmates during the internship?

  • Family expectations for your work and their own work expectations;

    If you make mistakes in your work and cause economic losses to our company, what do you think you should do?

  • 32, if the boss in the public meeting misunderstanding you, how to solve;

  • Whether can practice, can practice how long;

  • In five years time, your career plan;

  • What do you see in the company? Or what aspects of the company appeal to you the most.

Source: part of the content reprinted from the public account Yang Shoule, by the developer technology front additional collation.

Please reply “study”, “add group”.

Developer technology front gathers the latest technology dry goods, workplace insights, hot thinking, and front-line experience to help you become an excellent Internet person!

Related to recommend

2018 Autumn Recruitment interview experience – netease Java interview experience