wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

[FAST TRACK] Android quiz week 07 (27.05)

Total questions: 15

Worksheet time: 11mins

Name
Class
Date
1.
Which is type of Singleton allows intance is loaded into memory when calling method getInstance() ?
a)
Double Check Locking
b)
Thread Safe
c)
Bill Pugh
d)
Lazy Initialization
2.
Which of the following statements is true about Sequence Diagrams?
a)
Each message is represented by an arrow between the lifelines of two objects
b)
Each message is represented by a dashed vertical line
c)
Each message must be related to two distinct objects
d)
A&C
3.
What is different between Template Method pattern and Strategy pattern?
a)
Template Method pattern is compile-time algorithm selection, Strategy pattern is run-time algorithm selection.
b)
Template Method pattern is run-time algorithm selection, Strategy pattern is compile-time algorithm selection.
c)
Both of them is run-time algorithm selection. But algorithm in Template Method has independent relationship, algorithm in Strategy has constraint relationship
d)
Both of them is compile-time algorithm selection. But algorithm in Template Method has constraint relationship, algorithm in Strategy has independent relationship
4.
Which of these type parameters is used for a generic methods to return and accept any type of object?
a)
K
b)
N
c)
T
d)
V
5.
……………. controls life cycle of activities and manages activity stack level requirements
a)
Windows Manager
b)
Content Provider
c)
Activity Manager
6.
The difference between actors and objects of the same name is
a)
Actor is outside and object is inside the system
b)
Objects are outside and actors are inside the system
c)
Objects have behavior and actors have no behavior
d)
Actor has behavior and object has no behavior
7.

It is used in the following cases:

- When we want to represent a partial or full hierarchy of objects.

- In case we need to add the responsibilities dynamically to the individual object without affecting other objects.

What it is?

a)
Composite pattern
b)
Decorator pattern
c)
Template pattern
d)
State pattern
8.
Using quick sort is a stable way of sorting
a)
true
b)
false
9.
What is true about threading?
a)
run() method calls start() method and runs the code
b)
run() method creates new thread
c)
run() method can be called directly without start() method being called
d)
start() method creates new thread and calls code written in run() method
10.
getExternalFilesDir( ) method is used to get the directory of the external storage.
a)
true
b)
true
11.
How is a simulator different from an emulator?
a)
Emulators are only used to play old SNES games, simulators are used for software development
b)
The emulator is shipped with the Android SDK and third party simulators are not
c)
The emulator can virtualize sensors and other hardware features, while the simulator cannot
d)
The emulator imitates the machine executing the binary code, rather than simulating the behavior of the code at a higher level
12.

"For each Android class that can be injected by Hilt, there's an associated Hilt component? "

True or False?

a)
true
b)
false
13.
Which of the following Android Studio folders includes drawable files for different launcher icon densities?
a)
Mipmap
b)
Layout
c)
Drawable
d)
Values
14.

Fill in the blank space in the following sentence with the correct choice:

The ………………………… is a layout that arranges other views either horizontally in a single column or vertically in a single row.

a)
LinearLayout
b)
RelativeLayout
c)
ConstraintLayout
d)
Frame Layout
15.
What does API stand for?
a)
Application Programming Interface
b)
Android Programming Interface
c)
Android Page Interface
d)
Application Page Interface