Worksheets[FAST TRACK] Android Class Quiz week 05 12/05
Total questions: 15
Worksheet time: 11mins
Name
Class
Date
1.
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
2.
What is the difference between const and val?
a)
The keywords const and val are used to declare an immutable property (read-only properties).
b)
const is also known as Compile-time constant. So, no runtime assignment of values is allowed in const variables. So, you can't assign a const variable to a function or to some class. And the val properties can be initialised at the runtime. So, you can assign a val variable to a function or to some class
c)
const only can be used for number like Integer, Long, float. Val can use for all type.
3.
Can we create a clone of a singleton object?
a)
true
b)
false
4.
With x = 0, which of the following are legal lines of Java code for changing the value of x to 1?
a)
1, 2 & 3
b)
1 & 4
c)
1, 2, 3 & 4
d)
3 & 2
5.
What are the configuration changes?
a)
Language changes
b)
Sensor changes
c)
Screen rotations
d)
Keyboard changes
6.
A series of actions for a particular Use Case without class behaviours can be modelled using......
a)
A Class Diagram
b)
A Package Diagram
c)
A Sequence Diagram
d)
An Activity Diagram
7.
What is the difference between a factory and an abstract factory design pattern?
a)
Factory pattern is in Creational groups but Abstract factory pattern does not.
b)
Factory pattern creates an object through inheritance and produces only one Product. And abstract factory pattern creates the object through composition and produce families of products.
c)
Abstract factory pattern creates an object through inheritance and produces only one Product. And factory pattern creates the object through composition and produce families of products.
d)
There is no different between them.
8.
Complete this sentence: ... often uses .... and defining algorithm's step for …
a)
Strategy pattern/ Template Method pattern/ Factory pattern
b)
Template Method pattern/ Strategy pattern/ Factory pattern
c)
Template Method pattern/ Factory pattern/ Strategy pattern
d)
Factory pattern/ Strategy pattern/ Template Method pattern
9.
Fill input text: This sequence is .... diagram for demonstrate scenarios which user interacts.
a)
Usecase
b)
Sequence Diagram
c)
Class Diagram
d)
Model
10.
"Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later."
Which design pattern is mentioned above?
a)
State
b)
Memento
c)
Prototype
d)
Composite
11.
AIDL stands for ….
a)
Android Interface Definition Language
b)
Android Intermediate Definition Language
c)
Android Interface Description Language
d)
Android Internal Definition Language
12.
The relationship between class A and class B is
a)
Dependency
b)
Realization
c)
Composition
d)
Aggregation
13.
What is the difference between HashMap and Hashtable?
a)
HashMap is NOT synchronized. Hashtable is synchronized.
b)
HashMap is synchronized . Hashtable is NOT synchronized.
c)
HashMap cannot contain any null keys or null values. Hashtable can contain one null key and multiple null values.
d)
HashMap can contain one null key and multiple null values. Hashtable cannot contain any null keys or null values.
14.
When the activity is not in focus, but still visible on the screen it is in?
a)
running state
b)
paused state
c)
stopped state
d)
destroyed state
15.
When compiling, I get an Exception in thread main java.lang.NoClassDefFoundError:myprogram. What does this error mean?
a)
The program path is wrong.
b)
There is no main function
c)
No class declaration
d)
There is no public keyword at the beginning of the class declaration
100 %
