Home > Common Problem > Common multiple choice Android interview questions [with answers]

Common multiple choice Android interview questions [with answers]

藏色散人
Release: 2020-07-31 17:05:43
forward
5736 people have browsed it

Recommended: "2020 Android interview questions summary [Collection]"

The following interviews I have encountered this question more than once in interviews. Although it is just a simple multiple-choice question in the written test, it may also be the first level of your interview and pave the way for your subsequent performance!

1.Which of the following statements about memory recycling are correct? (b)
A, The programmer must create a thread to release the memory
B, The memory recycling program is responsible for releasing useless memory
C, The memory recycling program allows the programmer to directly release the memory
D、The memory recycling program can release the memory object at the specified time
2.The following exception belongs to Runtime Exception (abcd )(Multiple selection)
AArithmeticException
B IllegalArgumentException
CNullPointerException
DBufferUnderflowException
3.Math.round(11.5)is equal to how many(). Math.round(-11.5) is equal to how much(c).
A11 ,-11 B11 ,-12 C12 ,-11 D12 ,-12
Explanation: The rounding algorithm in java is to add 0.5 to the original value, and then Take the closest value to it.

4.The output result of the following program segment is:(b)

1. "font-size:18px;">void complicatedexpression_r(){

2. int x=20, y=30;

3. boolean b;

4. b=x>50&&y>60||x>50&&y<-60||x<-50&&y>60||x<-50&&y<-60; (b);

6. }

Atrue Bfalse C1 D011.activity
5.To save some resources and status operations, it is best to save them in which function of the life cycle(d)
AonPause() BonCreate()ConResume()DonStart()

6.IntentWhen passing data, which of the following data types can be passed (abcd)(Multiple choices)
ASerializable BcharsequenceCParcelableDBundle

7. In android , the following functions belonging to Intent are (c)
A, realizing inter-application communication Data sharing
B is a program with a long life cycle and no user interface. It can keep the application running in the background without disappearing due to switching pages
C, It can realize switching between interfaces, can contain actions and action data, connect the four major components
D, and handle the overall work of an application

8.The following are the advantages of SAXparsing xml files(b)
A. Store the entire document tree in memory for easy operation. It supports deletion, modification, rearrangement and other functions.
B. There is no need to load the entire document in advance, and it takes up less resources.
C. The entire document is transferred into the memory, which wastes time and space.
D. It does not reside in the memory for a long time, and the data is not persistent. After the event, if the data is not saved, the data will Disappear

9.The correct way to customize the style below is (a

A

<resources>
<style name="myStyle">
<item name="android:layout_width">fill_parent</item>
</style>
</resources>
Copy after login

B

<style name="myStyle">
<itemname="android:layout_width">fill_parent</item>
</style>
Copy after login

C

<resources>
<itemname="android:layout_width">fill_parent</item>
</resources>
Copy after login

D

<resources>
<stylename="android:layout_width">fill_parent</style>
</resources>
Copy after login

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

AonCreateOptionsMenu()

BonCreateMenu()

ConOptionsItemSelected()

DonItemSelected()

11.SQL ServerManagement Studio中运行下列T-SQL语句,其输出值(c)。

SELECT @@IDENTITY

A、可能为0.1

B、可能为3

C、不可能为-100

D、肯定为0

12.SQL Server2005中运行如下T-SQL语句,假定SALES表中有多行数据,执行查询之 后的结果是(d)。

BEGIN TRANSACTION A
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
Copy after login

ASALES表中qty列最小值大于等于30

BSALES表中qty列最小值大于等于40

CSALES表中qty列的数据全部为50

DSALES表中qty列最小值大于等于60

13.android中使用SQLiteOpenHelper这个辅助类时,可以生成一个数据库,并可以对数据库版本进行管理的方法可以是(ab)

AgetWriteableDatabase()

BgetReadableDatabase()

CgetDatabase()

DgetAbleDatabase()

14.android 关于service生命周期的onCreate()onStart()说法正确的是(ad)(多选题)

A、当第一次启动的时候先后调用onCreate()onStart()方法

B、当第一次启动的时候只会调用onCreate()方法

C、如果service已经启动,将先后调用onCreate()onStart()方法

D、如果service已经启动,只会执行onStart()方法,不在执行onCreate()方法

15.下面是属于GLSurFaceView特性的是(abc)(多选)

A、管理一个surface,这个surface就是一块特殊的内存,能直接排版到android的视图view上。

B、管理一个EGL display,它能让opengl把内容渲染到上述的surface上。

C、让渲染器在独立的线程里运作,和UI线程分离。

D、可以直接从内存或者DMA等硬件接口取得图像数据

16.下面在AndroidManifest.xml文件中注册BroadcastReceiver方式正确的(a)

A

<receiver android:name="NewBroad">
<intent-filter>
<action android:name="android.provider.action.NewBroad"/>
<action>
</intent-filter>
</receiver>
Copy after login

B

<receiver android:name="NewBroad">
<intent-filter>
android:name="android.provider.action.NewBroad"/>
</intent-filter>
</receiver>
Copy after login

C

<receiver android:name="NewBroad">
<action android:name="android.provider.action.NewBroad"/>
<action></receiver>
Copy after login

D

<intent-filter>
<receiver android:name="NewBroad">
<action> android:name="android.provider.action.NewBroad"/>
<action>
</receiver>
</intent-filter>
Copy after login

17.关于ContenValues类说法正确的是(a)
A、他和Hashtable比较类似,也是负责存储一些名值对,但是他存储的名值对当中的
名是String类型,而值都是基本类型
B、他和Hashtable比较类似,也是负责存储一些名值对,但是他存储的名值对当中的
名是任意类型,而值都是基本类型
C、他和Hashtable比较类似,也是负责存储一些名值对,但是他存储的名值对当中的
名,可以为空,而值都是String类型 
D、他和Hashtable比较类似,也是负责存储一些名值对,但是他存储的名值对当中
的名是String类型,而值也是String类型

18.我们都知道Hanlder是线程与Activity通信的桥梁,如果线程处理不当,你的机器就会变得越慢,那么线程销毁的方法是(a)
AonDestroy()
BonClear()
ConFinish()
DonStop()

19.下面退出Activity错误的方法是(c
Afinish()
B、抛异常强制退出
CSystem.exit()
DonStop()

20.下面属于android的动画分类的有(ab)(多项)
ATween BFrame CDraw DAnimation

21.The following is about the process of Androiddvm and the process of Linux,The correct statement of the process of the application is (d)
A, DVM refers to dalivk's virtual machine.Every Android application runs in its own process, does not necessarily have an independent The Dalvik virtual machine instance. and each DVM is in# A process in ##Linux,so it can be considered as the same concept. B
, DVM refers to the virtual machine of dalivk.eachAndroidApplications run in its own process, does not necessarily have an independent DalvikVirtual machine instance.And every DVM is not necessarily in Linux## A process in #,, so it is not a concept.C
DVM refers to the virtual machine of dalivk.each AndroidThe application runs in its own process,has an independentDalvikvirtual machine instance.And every DVM is not necessarily a process in Linux,So it’s not a concept.D, DVM refers to the virtual machine of dalivk.eachAndroidThe application runs in its own process,has an independentDalvik Virtual machine instance. And each DVM is in Linux## A process in #,, so it can be considered as the same concept.

22.Android

project engineering What is the function of the following assets(b)A
, to place the image resources applied to it. B
, mainly place multimedia and other data filesC
, place strings, colors, arrays and other constant dataD
, place some and UIThe corresponding layout files are all xml files

23.

Aboutres/rawThe correct directory statement is (a)A
. The files here are stored intact on the device. It will be converted to binary format B
. The files here are stored intact on the device and will be converted to binary format C
. The files here are finally converted to binary format. The format is stored in the specified packageD
. The files here will not be ultimately stored in the binary format in the specified package

Note : In Android, you cannot directly open the database file in the res aw directory, but you need to copy the file to the phone memory or SD card when the program is started for the first time. directory, and then open the database file. The basic method of copying is to use the getResources().openRawResource method to obtain Get the InputStream

24 of the resource in the res aw directory.

The following is the correct understanding of android NDK (abcd )A
, NDK is a collection of a series of tools B
, NDK provides a stable, limited-function API header file declaration. C
, so that the development method of "Java C" is finally corrected and becomes an officially supported development Method D
, NDK will be Android Platform SupportC The beginning of development

The above are some simple questions. Some of them can be remembered after reading them once. If you don’t understand some of them, you should check them online and add your impressions!

The above is the detailed content of Common multiple choice Android interview questions [with answers]. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template