wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Kotlin

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

One of the operating systems that can not be used for Andriod application development is?

a)

Windows

b)

Mac

c)

Linux

d)

Contiki

2.

In Andriod Studio, the virtual console type tab that is used as a command-line interface is called?

a)

Memory

b)

CPU

c)

Logcat

d)

ADB logs

3.

On implementing the method of onStartCommand(), the service must be stopped after the task is completed using?

a)

stopSelf()

b)

stopService()

c)

stopSelf() or stopService()

d)

endService()

4.

The space between the edge of a widget content can be customized using?

a)

Margins

b)

Height

c)

Padding

d)

Weight

5.

In Andriod Studio the tab in which error is shown is called?

a)

Logcat

b)

ADB logs

c)

CPU

d)

Memory

6.

What does this code do?


foo()()

a)

Calls a function which is returned by the call foo

b)

Calls "foo" asynchronously

c)

Fails compilation

d)

Creates a two-dimensional array

7.

What is "to" in the example below?

a)

A kotlin keyword to create a Pair(33,42)

b)

An infix extension function creating a Pair(33,42)

c)

A syntax error

d)

A kotlin keyword to create a range from 33 to 42

8.

Which is true for the following simple class declaration?

a)

It has a private property "name"

b)

It is package-private

c)

It can be extended by other classes

d)

It is public

9.

What does the following code print?

a)

[1,2,3,4]

b)

Nothing, there is a compile error

c)

True

d)

Unit

10.

What is the difference between A and B?

a)

"a" is volatile as in Java

b)

"b" is final and cannot be changed

c)

"b" can never become null

d)

"a" is final and cannot be changed

11.

What is the output of the following code?

a)

[1,2,3,4]

b)

It does not compile, as "listof" is not known

c)

It does not compile as "list" has no "add" method

d)

[5,6,7]