Looking back on my experience during this period, in September, the company informed me of the layoff. I hurriedly went out to meet several companies, but failed to get any offer at last. I feel a little cold in the winter of this year. In December, the company began a second wave of layoffs, and I decided to take the money and leave. During the subsequent interview, I made some preparations, and basically reached hr. Later, I also got the offer successfully. I would like to share my experience of job hunting with you, hoping to give you some reference.
The Android interview is divided into two parts: Java part and Android part.
A JAVA related
1) JAVA basics
== equals (hashCode) == (hashCode) == (hashCode) == (hashCode) == (hashcode); 6.java 7.com the difference between pareable and compartor 6.java 7.com the difference between pareable and compartor
What it prints out. There are a lot of questions like this, looking at the firmness of the basic knowledge. So I need to consolidate the foundation.
2) Data structure and algorithm
Common data structures are arrays, stacks, queues, sets, maps, linked lists, heaps, binary search trees, and red-black trees. Of course, there are others, such as AVL balance trees and other data structures.
What we need to do is to understand how they are implemented and the pros and cons of each.
In the data structure part of the interview, the most encountered are:
1. Differences between ArrayList and LinkedList, advantages and disadvantages 2. Implementation of HashMap, how to do expansion, how to handle hash conflicts, HashCode algorithm, etc. 3. Linked lists need to know. LinkedHashMap will ask LRU about binary search tree features and principles. To write one of them, when asked about the disadvantages of binary search trees, you need to come up with a red black tree based on binary search trees, and name its characteristics. 5. Realization of heap, maximum heap, minimum heap, priority queue principle.
algorithm
The algorithm is actually we usually common some sort: select sort, insert sort, bubble sort, Hill sort, merge sort, quick sort. And some computational methods associated with data structures to solve part of the problem.
Some questions encountered in algorithmic interview:
1. Handwritten quicksort, Insert sort, bubble sort 2. Flip a number 3. Flip a list 4.o (n) complexity to find the index 5 of the two numbers with 9 in the array. 6. Realize a queue, and can record the largest number in the queue. Algorithm is a part that needs practice. It is recommended to go to Leetcode to brush up questions and broaden your thinking. Algorithms don’t necessarily require you to be able to write them down, it’s about how you think, how you’ve optimized your algorithm.
3) JVM VMS
JVM virtual machines we need to know their internal components: heap, virtual machine stack, local method stack, method area, counter. What is stored in each block, and what blocks are recycled when garbage is collected. Where does the GC-root chain start, the garbage collection algorithm (rarely asked).
Classloaders have parent delegation mechanisms, the process of class loading, and which blocks of the JVM the information for class loading corresponds to.
List a class loading interview question encountered:
public class TestClassLoader {
static class Father {
public static final String TAG = "Father";
static {
System.out.println("static Father");
}
{
System.out.println("unStatic Father");
}
public Father() {
System.out.println("constract Father");
method();
}
public void method() {
System.out.println("method Father");
}
@Override
public String toString() {
return "toString Father";
}
}
static class Son extends Father {
public static Son instance = new Son();
static {
System.out.println("static Son");
}
{
System.out.println("unStatic Son");
}
public Son() {
System.out.println("constract Son");
method();
}
public void method() {
System.out.println("method Son");
}
@Override
public String toString() {
return "toString Son";
}
}
public static void main(String[] args) {
System.out.println("1. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -");
System.out.println(Son.TAG);
Son[] sons = new Son[10];
System.out.println(sons);
System.out.println("2. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -");
System.out.println(Son.instance);
System.out.println("3. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -");
Son son = new Son();
Father father = son;
father.method();
System.out.println(son);
}
Copy the code
}
Write the printout.
Add an interlude: Are you hungry? The person who interviewed me said he was a graduate student of Beijing University of Aeronautics in 17 years. Said that he very pay attention to the foundation, the whole process asked a lot of JAVA foundation, including the above class loading problem, very proud to say that this problem is his own. And what are the subclasses of Collections, and how are they different? But the level of android-related questions is mediocre, and this is not meant to be sarcastic. The point is that some interviews are doomed from the start that you may not get into the company. An interview is sometimes a matter of eye contact. Don’t lose heart. Find your weakness, fill it, and move on. There is the above question, it is really good.
4) Thread safety
When multiple threads access to an object, if don’t have to consider these threads in the runtime environment of scheduling and execution alternately, also do not need to undertake additional synchronization, or any other coordinated operation in the caller, call the object’s behavior can obtain correct results, we think the object thread safe.
Thread safety is some multi-threaded downloads, synchronization, locking, deadlocks, thread pools. The nature of the volatile keyword, and the atomicity of variables. As well as the classes under the java.util.Concurrent package.
Questions are asked about handwritten singletons and the advantages of double-locked singletons. There is also let yourself implement a multi-threaded download, depending on how you design.
5) Programming ideas
Encapsulation, inheritance, polymorphism, abstraction, reflection, annotations, design patterns, principles of design patterns.
The following questions are commonly asked in an interview:
1. What is the difference between abstraction and interface 2. Common design patterns in work, some of the source code design patterns 3. Give you a specific design pattern and tell you what you know about it, like observer, factory. All of these things test your code design skills.
6) Network protocol
1. The implementation of the Internet is mainly divided into several layers, which layer is HTTP, FTP, TCP, and IP respectively. The difference between HTTP and HTTPS 3. Why does TCP go through three-way handshake and four-way wave? 4. TCP and socket are occasionally asked.
JAVA section summary
I think the JAVA part can be roughly broken down into these chunks, and if you think about a set of code, it’s really classes and how you combine those classes, and how you combine those classes is really design patterns. Classes contain the basic data types and the data institutions that hold those basic data types or classes, and then how the JVM loads those classes. I recommend a few books for the above sections: JAVA Programming Minds, Deep Understanding of the JAVA Virtual Machine 2nd Edition, Big Talk Design Patterns, HeadFirst Design Patterns, Data Structures and Algorithms, Illustrated HTTP
Data structures and algorithms: github.com/wangxp423/E… And Liuyubobobo mentioned in readme for his open source code and documentation. He recorded four videos on MOOCs explaining data structures and algorithms. Documentation is easy to understand. Great for beginners and people who want to understand the system.
In this due to a lot of text, I summed up the Android interview involved in the frequently asked range and frequently asked interview questions free to share with you, the end of the article has received!
Three Android
I’m not going to break down the Android part. List directly, but each of the items listed is something that interviews often ask and will extend, so you need to research it in depth.
1. What are the four components? Tell us your understanding of their functions in Android system. 2.Activity life cycle, A start B two page life cycle how to run, why it is like this, why the life cycle design, do you have any understanding. 3. Four startup modes, how the internal stack works, and how you use it in your work. 4. The Activity startup process, which I strongly recommend every Android developer to clearly know, and follow the source code, the role of several core classes. You’ll have a better understanding of Android. 5. Event distribution process and how to deal with sliding conflicts. Example: Hold down an Item of the ListView and it turns gray. It’s sliding. Items are restored to their original appearance, and what their internal event passing looks like at this point. There are many ways to ask, so make sure you know. 6. Customized View and its drawing process. OnMeasure onLayout, ontouch is what role. How a ViewGroup distributes drawings. You need to know how to do drawing, Canvas,Path,Paint in onDraw. And with ValueAnimtor or Scroller to achieve animation. Sometimes the interviewer will ask you that the ViewGroup is a tree structure, I want to know the depth of the tree, how do you calculate, suddenly it becomes a data structure and algorithm question. Animation and Animator 9.LinearLayout, RelativeLayout, FrameLayout three commonly used layout features, how to calculate the layout. How efficient. CoordinatorLayout works with the use of AppbarLayout and custom Behavior. Use of ConstraintLayout. To reduce hierarchy. Handler message mechanism, recommended to see Looper source code 11. Interprocess communication, Binder mechanism 12.AsyncTask source code look at. Image compression processing, three level cache, Lru algorithm 14. Resolution and screen density, and calculate the size of a picture. Mdpi, HDPI relationship and ratio. Optimization, memory optimization, layout optimization, startup optimization, performance optimization. Memory leaks. Memory overflows. How to optimize, what tools to use, how to do it. 16. Compare listView and RecycleView, and cache strategy. JNI (rarely asked) 18.MVC,MVP,MVVM 19. Okhttp open source framework, Glide, EventBus Rxjava etc., and the open source libraries under the JetPack, want to use, also tell me about some things, recommend Retrofit, Okhttp, Glide, EventBus these look at the source. 20 RecyclerView four block, can achieve what effect, roughly how to implement, the in the mind to have 21. DecorView, Window, WindowManager, PhoneWindow relationship, and is the responsibility of the. Bonus points: Kotlin, Gradle, Flutter, componentization, plug-in, hot repair.
Iv summary of Android
The relevant content of the above column seems to be a short sentence, but each one requires you to study in depth. To understand the principle, it is best to look at the source code implementation. Of course, there are some I did not write, may be I did not think of when writing, does not mean that they are not important, you also need to pay attention to, again a wave of recommendation: “Android development art Exploration” strongly recommended, recommended carefully read, if careless recommended to read two or three times, targeted read. “Android Advanced Light” “Advanced Android development intensive combat” “Android componentized Architecture” “Android Hot Repair Technology Principle” “Android plug-in development Guide”
Five Interview tips
1. Be prepared and knowledgeable as much as possible. 2. In terms of interview arrangement, if you are not in a hurry, try to leave yourself as much time as possible. 3. Keep your mind level. As a technical exchange, an interview is partly a matter of luck, but also of eye contact. Want to go to the company is not good interview, don’t be discouraged, continue to prepare. 4. Resume delivery, there are a lot of often do not match the check box, may be my education problem (self-test), some blow confidence, if you have the same feeling, might as well change BOSS or other platforms. Avoid damaging your self-confidence. 5. Make sure your resume shows your strengths, preferably what skills you used and what problems you solved. Be prepared for what you write on your resume. 6. Like what are your strengths, what do you think you have done well in the project, and what can you bring to the company, you should think about these questions in mind first, so as not to be nervous about improvising. 7. The average number of technical interviews I’ve had is at least two. If you feel good about yourself after the first round, THEN I think it’s worth reviewing the interview and looking for more information about that question one by one. Most of the problems are that you didn’t get to the point, either in depth or in depth. Keep it up.
Six small talk
Now the outside interview is really more, the requirements are quite high, the market is not good, salary is not good to, so the mentality must be put well, find their own positioning, mentality must be better.
Will try to do after the interview summary, from the most not ready to go out with the interview, after he was hit 1, summarizes the seven or eight interview questions, will send the new interview asked those who are knowledge, possible Angle is different, but you as long as deep enough, how could he ask, you to answer, based on the principle of basically no difference, from signed a compensation agreement after the interview, Four companies in a row have gone to HR, so it’s like an interview. After all, the previous summary and accumulation were not in vain.
Before writing this article, I specially looked at my previous collection of other public number sent on the interview questions, very complete, I do not want to write this article. But then I think about the three months I’ve heard about layoffs and started interviewing, and the first batch of layoffs didn’t come, and the second batch of layoffs didn’t come. Offer to be laid off when the second batch arrives. In the middle of the interview was hit, frustrated, saw the news that there are layoffs, so far the interview overall feeling good. Or I want to share my heart journey, I want to tell you, don’t panic about layoffs, do what you should do, other things you can’t decide, put it on hold, list a 123 in your heart, one by one.
You can see I’ve recommended a lot of books on it, and the JAVA section is coming up in chunks. Because when I see a lot of interview questions, there will be a lot of questions, and sometimes you will think that you have all the questions, but the interview is still not good, which means that your knowledge is not solid. Or if you know this problem but don’t have a thorough understanding, I will describe it in chunks in the JAVA section, and I recommend a related book for each section. You may not need to read all of them, but you can read them specifically. The Android part is about detailed knowledge points, which I hope will be studied in depth. And recommended books, part of the book has some relevant knowledge points, we can also selectively see, of course, forums, blogs are the source of knowledge, we do a good job of knowledge depth and breadth of the base class on the line.
Finally, despite all the layoffs and talk of Android’s demise, don’t panic. Make your own plans and learn your own lessons. Competition is everywhere, in every industry. I wish you all the best in 2019.
To read more
Capital winter under the Android surface
Android Custom View — What is Page?
Flutter will strike back! 1.2 version released, or will be unified rivers and lakes
APK: From Android source code to APK compilation and packaging process
If you are interested in technology development, welcome to join me in the development of technology, technology Id:codeGoogler