Organize your recent Android interview questions

Source: Internet
Author: User

Java Related:

  1. What is the difference between public protect private default keywords?

Public: Indicates that it can be accessed in any one of the classes;

Protect: Indicates that it can be accessed in its own, subclass, and class under the same package;

Default: Indicates that it can be accessed in the class itself and under the same package;

Private: Indicates that it can only be accessed in its own class;

  2. What is the difference between extend and implements?

Extend is used to create a subclass of a class, and implements is used to declare that this class uses one or more interfaces. Extend is inherited from the parent class, you can use the method in the parent class, and implements is the implementation of multiple interfaces, the interface method must be empty and overridden in this class to be used by the implementing party. Implement cannot overwrite methods and variables in the parent class, even if the child class defines the same variable or function as the parent class, and is replaced by the parent class.

46135645

  3. Briefly describe the differences between heap and stack in memory. What data is stored in the heap and which is stored in the stack?

The advantage of the stack is that the access speed is relatively fast, only in the CPU registers, but the data size and the lifetime of the stack must be deterministic, lack of flexibility, the other stack data can be shared, and the advantage of the heap is the ability to dynamically allocate memory size, the lifetime does not have to tell the compiler, Java's garbage collection mechanism automatically cleans up data that is no longer in use, but has the disadvantage of dynamically allocating memory at run time and slow access.

Stack storage: Basic data type variables (int, short, long, byte, float, double, Boolean, char)

Heap Storage: Wrapper class data (class interger,string,double, etc. that wrap the basic type)

  4. How do I make multi-threaded tasks switch?

(This may be mistaken.) )

  5. Modalities for inter-process communication.

(1) Aidl, (2) broadcast, (3) Messenger
Aidl:https://www.jianshu.com/p/a8e43ad5d7d2
https://www.jianshu.com/p/0cca211df63c
messenger:http://blog.csdn.net/lmj623565791/article/details/47017485
Extended here: Brief introduction to Binder, http://blog.csdn.net/luoshengyang/article/details/6618363/

  6. What is the difference between HTTP communication and HTTPS communication, and the specific process of HTTPS communication?

http://blog.csdn.net/whatday/article/details/38147103

  7. How to implement the source code for such a collection of list,arraylist.

    55259978

Android Related:

  1. About Android memory optimization, layout optimization.

http://blog.csdn.net/guolin_blog/article/details/42238627
This article has four articles, very detailed.
Extended here:
(1) The difference between memory overflow (OOM) and memory leaks (objects cannot be recycled).
(2) Causes of memory leaks

51020023

Layout optimization: http://blog.csdn.net/guolin_blog/article/details/43376527

  2. What is the difference between Android relative layout and absolute layout loading order?

    

  3. Describe the MVC and MVP structure and the difference between them?

    46596109

Organize your recent Android interview questions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.