wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz Android 1

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

How to share view model between fragment-fragment, activity-fragments?

a)

Init view model using "by viewmodels()" function of fragment-ktx

b)

Init view model using "by activityViewModels()"" function of fragment-ktx

c)

Init view mode by using "ViewModelProvider(fragment context).get"

d)

Init view model by using "ViewModelProvider(activity context).get"

2.
What is different between DataBinding and FindViewById method?
a)
DataBinding generate binding class at runtime and findViewById run at compile time.
b)
DataBinding generate binding class at compile time and findViewById run at runtime.
c)
DataBinding and findViewById run at compile time.
d)
DataBinding and findViewById run at runtime
3.

What happens when you use the API 15 features but set compile Sdk Version to 14?

a)

Get error when run application

b)

Get error when compilation

c)

All of above

d)

No errors

4.
Which sentences is wrong when say about lateinit and lazy keyword
a)
lateinit if for non-null properties, it means no need to check null for it.
b)
lateinit can only be used with var (mutable) properties whereas lazy can only be used for val (immutable) properties.
c)
lateinit and lazy can work with primitive type.
d)
While using Singleton Pattern (Object Declaration in Kotlin) we should use lazy, as it will be initialized upon first use.
5.
How many threads can be executed at a time?
a)
Only one thread
b)
Only main (main() method) thread
c)
Multiple threads
d)
Two threads
6.

Android uses “Intents” to communicate and send data between different components which make it vulnerable to malicious attacks. Which of the following choices are component level Permissions to protect this type of communication? (Multi select)

a)

Activity

b)

Service

c)

Content Provider

d)

Widgets

7.
Android SQLite database files are stored under the ………………………………… directory
a)
/data/database/<application-path>/databases/
b)
/data/data/<application-path>/databases/
c)
/data/files/<application-path>/databases/
d)
/data/mydata/<application-path>/databases/
8.
What is contained within the manifest xml file?
a)
The permissions the app requires
b)
The list of strings used in the app
c)
The source code
d)
All above choices
9.
AIDL stands for ….
a)
Android Interface Definition Language
b)
Android Intermediate Definition Language
c)
Android Interface Description Language
d)
Android Internal Definition Language
10.
SQLite is an Open Source Database system embedded into every Android device.
a)
True
b)
False
11.
Which of the following classes has methods to create, delete, execute SQLite commands and perform other common SQLite database management tasks?
a)
SQLiteOpenHelper
b)
SQLiteDatabase
c)
Cursor
d)
Progressbar
12.
Which does definition fit best with the image below?
a)
Static View
b)
Class Diagram
c)
SAD
d)
SDD
13.
What type of relationship is represented by Shape class and Square?
a)
Realization
b)
Generalization
c)
Aggregation
d)
Dependency
14.
A flowchart needs to represent the a situation where the user is asked to enter 20 marks in succession. This is an example of which of the algorithm constructs?
a)
Decision
b)
Loop
c)
Sequence
d)
All of the above
15.

Which is type of Singleton allows instance is loaded into memory when calling method get Instance() ?

a)

Double Check Locking

b)

Thread Safe

c)

Bill Pugh

d)

Lazy Initialization