Android interview questions-choose to fill in the blanks (1)

Source: Internet
Author: User

I. multiple choice questions:

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 Exception is a Runtime Exception (abcd) (multiple choice)

A. ArithmeticException
B. IllegalArgumentException
C. NullPointerException
D. BufferUnderflowException

3,Math. round (11.5) equals to (). Math. round (-11.5) equals to (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-y = ""> 60 | x <-50

Y-br = "" style = "font-size: 14px; font-style: normal; font-weight: 700; font-family: Tahoma ,; "microsoft =" "yahei =" "simsuncolor =" "/> System. out. println (B );
}
A, true B, false C, 1 D, 011. activity5.

5,Save some resources and status operations, preferably 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) When Intent transmits data (Multiple choices)

A, Serializable B, charsequence C, Parcelable D, Bundle

7,AndroidWhich of the following is Intent? (c)

A. implement 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 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,When using Menu in android, you may need to override (ac ). (Multiple options)

A. onCreateOptionsMenu ()
B. onCreateMenu ()
C. onOptionsItemSelected ()
D. onItemSelected ()

10,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.

11,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 br = "" style = "font-size: 14px; font-style: normal; font-weight: 400; font-family: tahoma,; "microsoft =" "yahei =" "simsuncolor =" "/> BEGIN TRANSACTION B
Update SALES Set qty = 40 WHEREqty <40 br = "" style = "font-size: 14px; font-style: normal; font-weight: 400; font-family: tahoma,; "microsoft =" "yahei =" "simsuncolor =" "/> Update SALES Set qty = 50 WHEREqty <50 br =" "style =" font-size: 14px; font-style: normal; font-weight: 400; font-family: Tahoma ,; "microsoft =" "yahei =" "simsuncolor =" "/> Update SALES Set qty = 60 WHEREqty <60 br =" "style =" font-size: 14px; font-style: normal; font-weight: 400; font-family: Tahoma,; "microsoft =" "yahei =" "simsuncolor =" "/> COMMIT TRANSACTIONB
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.

12,When SQLiteOpenHelper is used in android, a database can be generated and the database version can be managed by (AB)

A. getWriteableDatabase ()
B. getReadableDatabase ()
C. getDatabase ()
D. getAbleDatabase ()

13,Which of the following statements about onCreate () and onStart () in the service lifecycle of android is true? (ad) (multiple choice questions)

A. The onCreate () and onStart () methods are called successively at the first startup.
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.

14,Which of the following is the GLSurFaceView feature (abc) (multiple choice)

A. Manage A surface. This surface is A special memory that can be directly typesented 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.

15,Which of the following is the correct method for registering BroadcastReceiver in the AndroidManifest. xml file? ()A. android: name = "android. provider. action. NewBroad"/<
B. android: name = "android. provider. action. NewBroad"/<
C. android: name = "android. provider. action. NewBroad"/<
D. android: name = "android. provider. action. NewBroad"/<

16,Which of the following statements about the ContenValues class is true? ()

A. He is similar to Hashtable and 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.

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

A. onDestroy ()
B. onClear ()
C. onFinish ()
D. onStop ()

18,The method for exiting the Activity below is (c)

A. finish ()
B. Throwing an exception and force exit
C, System. exit ()
D. onStop ()

19,Which of the following android animation categories are (AB) (multiple)

A, Tween B, Frame C, Draw D, and Animation

20,Which of the following statements about the process of Android dvm and the process of Linux is 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.

21,What is the role of the assets directory under the Android Project (B)

A. Place the image resources to be 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.

22,Which of the following statements about the res/raw directory is true? ()

A. The files here are not converted to binary format after they are stored on the device.
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.

23,Which of the following statements about android NDK is true? (abcd)

A. NDK is 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.

24,

25,

26,

27,

28,

29,

30,

31,

32,

33,

34,

Ii. multiple choice questions:

1,The four la s commonly used in android are:Framlayout, linenarlayout, relativelayout, and tablelayout.

2.The four components of ndroid are:Activiey, service, broadcast, and contentprovide.

3,In the java. io packageObjectinputstreamAndObjectoutputstreamClass is mainly used to read and write objects.

4,In android, the service implementation method is: StartserviceAnd bindservice.

5,Activity usually reloads 7 methods to maintain its lifecycle,OnCreate (), onStart (), onDestoryBesidesOnrestart, onresume, onpause, onstop.

6,Android Data StorageSharedpreference, File,SQlite, contentprovider,Network.

7,When an Activity is started and the new Activity is executed, the callback function that starts the Activity is returned.StartActivityResult ().

8,Use the command line to create a directory named myAvd and sdk Version 2.2. the SD card is under the root directory of drive D, named scard. img, and the screen size is HVGA._Android create avd-tandroid-8-n myAvd-c d:/avd/scard. img -- skin 480*320.

The SDK version ID can be viewed through android list targets.

9,The program runs as follows :_____ Good and gbc__________.

Public class Example {
String str = new String ("good ");
Char [] ch = {'A', 'B', 'C '};
Public static void main (String args []) {
Example ex = new Example ();
Ex. change (ex. str, ex. ch );
System. out. print (ex. str + "and ");
Sytem. out. print (ex. ch );
}
Public void change (String str, char ch []) {
Str = "test OK ";
Ch [0] = 'G ';
}
}

10,

11,

12,

13,

14,

15,

16,

17,

18,

19,

20,

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.