Android interview questions (2)

Source: Internet
Author: User

1. Which of the following statements about memory reclaim are correct? (B) A. the programmer must create A thread to release the memory.

B. The memory reclaim program is responsible for releasing useless memory.

C. The memory reclaim program allows programmers to directly release the memory.

D. The memory reclaim program can release memory objects at the specified time.

2. The following exceptions are Runtime exceptions: (abcd) (Multiple choices) A, ArithmeticException

B. IllegalArgumentException

C. NullPointerException

D. BufferUnderflowException

3. math. the value of round (11.5) is equal (). math. the number of round (-11.5) equals to (c ). c A, 11,-11 B, 11,-12 C, 12,-11 D, 12,-12

4. The output result of the following program segments is: (B)

Void complicatedexpression_r (){

Int x = 20, y = 30;

Boolean B;

B = x> 50 & y> 60 | x> 50 & y <-60 | x <-50 & y> 60 | x <-50 && y <-60;

System. out. println (B );

}

A, true B, false C, 1 D, 011. activity

5. to save some resources and status operations, it is best to store them in which function of the Life Cycle (d) A, onPause () B, onCreate () C, onResume () d. onStart ()

6. Which of the following data types can be passed (abcd) (Multiple choices) A, Serializable B, charsequence C, Parcelable D, and Bundle when Intent transmits data?

7. Which of the following functions of android are Intent? (c) A. data sharing between applications

B. It is a long life cycle. programs without a user interface can keep the applications running in the background without switching the page.

C. You can switch between interfaces, including actions and action data, and connect the four components.

D. process the integrity of an application

8. Which of the following are the advantages of parsing xml files by using SAX? (B) A. The entire document tree is stored in the memory, which is easy to operate and supports deletion, modification, and rescheduling.

B. The entire document does not need to be transferred in advance, which consumes less resources.

C. The entire file is transferred to the memory, which wastes time and space.

D. The data does not reside in the memory for a long time and is not persistent. After the event, if the data is not saved, the data will

Disappear

9. Which of the following methods is correct for custom styles?

A. <resources>
<Style name = "myStyle">
<Itemname = "android: layout_width"> fill_parent </item>
</Style>
</Resources>
B. <style name = "myStyle">
<Itemname = "android: layout_width"> fill_parent </item>
</Style>
C. <resources>
<Itemname = "android: layout_width"> fill_parent </item>
</Resources>
D. <resources>
<Stylename = "android: layout_width"> fill_parent </style>
</Resources>

10. The methods that may need to be rewritten when using Menu in android are (ac ). (Multiple options) A, onCreateOptionsMenu ()

B. onCreateMenu ()

C. onOptionsItemSelected ()

D. onItemSelected ()

11. Run the following T-SQL statement in SQL Server Management Studio with the output value (c ). SELECT @ IDENTITY

A. It may be 0.1

B. It may be 3

C. Impossible-100

D. It must be 0.

12. Run the following T-SQL statement in SQL Server 2005, assuming that the SALES table has multiple rows of data, the result after the query is (d ). BEGIN TRANSACTION

Update SALES Set qty = 30 WHERE qty <30

BEGIN TRANSACTION B

Update SALES Set qty = 40 WHEREqty <40

Update SALES Set qty = 50 WHEREqty <50

Update SALES Set qty = 60 WHEREqty <60

COMMIT TRANSACTION B

COMMIT TRANSACTION

A. the minimum value of the qty column in the SALES table is greater than or equal to 30.

B. the minimum value of the qty column in the SALES table is greater than or equal to 40.

C. The data in the qty column in the SALES table is all 50

D. the minimum value of the qty column in the SALES table is greater than or equal to 60.

13. When SQLiteOpenHelper is used in android, A database can be generated and the database version can be managed by (AB) A and getWriteableDatabase ()

B. getReadableDatabase ()

C. getDatabase ()

D. getAbleDatabase ()

14. which of the following statements about the service life cycle onCreate () and onStart () of android is true? (ad) (multiple choice questions) A. When the first launch, the onCreate () and onStart () methods are called successively.

B. When it is started for the first time, only the onCreate () method is called.

C. If the service has been started, the onCreate () and onStart () methods will be called successively.

D. If the service has been started, only the onStart () method is executed, not the onCreate () method.

15. The following is the GLSurFaceView feature (abc) (multiple choice) A. It manages A surface. This surface is A special memory and can be directly formatted to the android view.

View.

B. Manage An EGL display, which enables opengl to render the content to the above surface.

C. Let the Renderer operate in an independent thread and separate it from the UI thread.

D. image data can be obtained directly from hardware interfaces such as memory or DMA.

16. The following is a correct method for registering BroadcastReceiver in the AndroidManifest. xml file:

A. <Cycler android: name = "NewBroad">
<Intent-filter>
<Action
Android: name = "android. provider. action. NewBroad"/>
<Action>
</Intent-filter>
</Cycler>
B. <Cycler android: name = "NewBroad">
<Intent-filter>
Android: name = "android. provider. action. NewBroad"/>
</Intent-filter>
</Cycler>
C. <Cycler android: name = "NewBroad">
<Action
Android: name = "android. provider. action. NewBroad"/>
<Action>
</Cycler>
D. <intent-filter>
<Cycler android: name = "NewBroad">
<Action>
Android: name = "android. provider. action. NewBroad"/>
<Action>
</Cycler>
</Intent-filter>
17. Which of the following statements about the ContenValues class is true? (a) A. It is similar to Hashtable. It is also responsible for storing some name-value pairs, but

The name is of the String type, and the value is of the basic type.

B. He is similar to Hashtable and is also responsible for storing some name-value pairs, but

The name is of any type, and the value is of the basic type.

C. He is similar to Hashtable and is also responsible for storing some name-value pairs, but

Name, which can be null, and the values are of the String type.

D. He is similar to Hashtable and is also responsible for storing some name-value pairs, but among the name-value pairs he stores

Is of the String type, and the value is of the String type.

18. We all know that Hanlder is a bridge between threads and activities. If the thread is improperly processed, the slower your machine will become, the thread destruction method will be (A) a, onDestroy ()

B. onClear ()

C. onFinish ()

D. onStop ()

19. The following method for exiting the Activity is incorrect: (c) A, finish ()

B. Throwing an exception and force exit

C, System. exit ()

D. onStop ()

20. The following Animation categories for android include (AB) (multiple) A, Tween B, Frame C, Draw D, and Animation.

21. which of the following statements about the process of Android dvm and the process of Linux are true? (d) A. DVM refers to the Virtual Machine of dalivk. every Android application runs in its own process and does not necessarily have an independent Dalvik Virtual Machine instance. every DVM is a process in Linux, so it can be considered the same concept.

B. DVM refers to the Virtual Machine of dalivk. every Android application runs in its own process and does not necessarily have an independent Dalvik Virtual Machine instance. every DVM is not necessarily a process in Linux, so it is not a concept.

C. DVM refers to the Virtual Machine of dalivk. every Android application runs in its own process and has an independent Dalvik Virtual Machine instance. every DVM is not necessarily a process in Linux, so it is not a concept.

D. DVM refers to the Virtual Machine of dalivk. every Android application runs in its own process and has an independent Dalvik Virtual Machine instance. every DVM is a process in Linux, so it can be considered the same concept.

22. What is the role of the assets directory under the Android project? bA, placement of image resources applied.

B. Mainly store multimedia and other data files

C. Place string, color, array, and other constant data

D. place some layout files corresponding to the UI, which are xml files.

23. Which of the following statements about the res/raw directory is true? (a) A. The files here are stored intact on the device and will not be converted to the binary format.

B. The files are stored on the device and converted to binary format.

C. The files are finally stored in the specified package in binary format.

D. The files here will not be stored in the specified package in binary format.

24. Which of the following statements about android NDK is true? (abcd) A and NDK are A collection of tools.

B. NDK provides a stable and functional API header file statement.

C. Finally, the development method of "Java + C" has become officially supported.

D. NDK will be the beginning of C development on the Android platform.

Ii. File Storage Methods

Iii. SQLite database Method

4. Content provider

 

Related Article

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.