Android Mobile - Study24x7
Social learning Network
androidmobile Cover image
androidmobile
Android Mobile
  • Followers
  • Latest Feeds
  • Articles
  • Question
  • Course
  • About
  • Review
Interests
Android
5 followers study24x7 14 Nov 2024 11:49 AM study24x7 study24x7

In Kotlin, val is used for declaring what type of variable?

A

Mutable variable

B

Immutable variable

C

Class

D

Function

study24x7
Write a comment
5 followers study24x7 14 Nov 2024 11:48 AM study24x7 study24x7

What is the base class for layouts in Android?

A

View

B

Activity

C

Layout

D

ViewGroup

study24x7
Write a comment
5 followers study24x7 14 Nov 2024 11:47 AM study24x7 study24x7

What is the correct syntax for a function in Kotlin?

A

function name(): Type {}

B

fun name(): Type {}

C

func name(): Type {}

D

fn name(): Type {}

study24x7
Write a comment
5 followers study24x7 13 Nov 2024 10:38 AM study24x7 study24x7

Which Android component is primarily used to display a collection of views?

A

RecyclerView

B

ViewPager

C

ConstraintLayout

D

RelativeLayout

study24x7
Write a comment
5 followers study24x7 13 Nov 2024 10:36 AM study24x7 study24x7

How do you declare a variable that cannot hold a null value in Kotlin?

A

val variable: Type

B

var variable: Type?

C

var variable: Type!

D

val variable: Type?

study24x7
Write a comment
5 followers study24x7 13 Nov 2024 10:34 AM study24x7 study24x7

Which of these is not an Android architecture component?

A

ViewModel

B

LiveData

C

DataBinding

D

ViewBinding

study24x7
Write a comment
5 followers study24x7 12 Nov 2024 10:31 AM study24x7 study24x7

What keyword is used to inherit a class in Kotlin?

A

implements

B

inherit

C

extends

D

:

study24x7
Write a comment
5 followers study24x7 12 Nov 2024 10:30 AM study24x7 study24x7

How is a Singleton created in Kotlin?

A

Using the object keyword

B

Using class keyword

C

Using interface keyword

D

Using abstract keyword

study24x7
Write a comment
5 followers study24x7 12 Nov 2024 10:29 AM study24x7 study24x7

Which function is called to start an Android activity?

A

openActivity

B

startActivity

C

newActivity

D

createActivity

study24x7
Write a comment
5 followers study24x7 11 Nov 2024 10:46 AM study24x7 study24x7

What is the purpose of lateinit in Kotlin?

A

To initialize properties only at compile-time

B

To delay the initialization of non-null properties

C

To initialize properties with null values

D

To initialize mutable variables

study24x7
Write a comment
5 followers study24x7 11 Nov 2024 10:46 AM study24x7 study24x7

What is the correct way to declare an interface in Kotlin?

A

interface InterfaceName { }

B

declare Interface InterfaceName { }

C

interface InterfaceName []

D

class InterfaceName {}

study24x7
Write a comment
5 followers study24x7 11 Nov 2024 10:45 AM study24x7 study24x7

Which of these is an Android Jetpack component for navigation?

A

ViewPager

B

Navigation Component

C

NavigationFragment

D

NavigationAdapter

study24x7
Write a comment
5 followers study24x7 09 Nov 2024 03:02 PM study24x7 study24x7

What does fun main() do in a Kotlin file?

A

Declares a new class

B

Starts the program

C

Defines a library

D

Starts an Activity

study24x7
Write a comment
5 followers study24x7 09 Nov 2024 03:01 PM study24x7 study24x7

Which function is used to display a Toast in Android?

A

Toast.show()

B

Toast.makeText()

C

Toast.create()

D

Toast.display()

study24x7
Write a comment
5 followers study24x7 09 Nov 2024 03:00 PM study24x7 study24x7

In Kotlin, what is the correct way to create a lambda function?

A

{ arg -> println(arg) }

B

fun { arg -> println(arg) }

C

lambda { arg -> println(arg) }

D

func { arg -> println(arg) }

study24x7
Write a comment
5 followers study24x7 08 Nov 2024 11:53 AM study24x7 study24x7

What does the companion object do in Kotlin?

A

Allows methods to be accessed without creating an instance of the class

B

Initializes all variables

C

Sets variables as mutable

D

Calls the primary constructor

study24x7
Write a comment
5 followers study24x7 08 Nov 2024 11:53 AM study24x7 study24x7

What does runBlocking do in Kotlin Coroutines?

A

Blocks the current thread until the coroutine completes

B

Runs a coroutine asynchronously

C

Stops a coroutine

D

Launches multiple coroutines

study24x7
Write a comment
5 followers study24x7 08 Nov 2024 11:52 AM study24x7 study24x7

What function is used to insert data into a Room database in Android?

A

insert()

B

add()

C

put()

D

save()

study24x7
Write a comment
5 followers study24x7 07 Nov 2024 10:55 AM study24x7 study24x7

Which Android UI component is recommended for large datasets?

A

RecyclerView

B

ListView

C

ScrollView

D

LinearLayout

study24x7
Write a comment
5 followers study24x7 07 Nov 2024 10:27 AM study24x7 study24x7

What is the correct syntax to create a list in Kotlin?

A

val list = arrayOf("A", "B", "C")

B

val list = listOf("A", "B", "C")

C

val list = ArrayList("A", "B", "C")

D

val list = new List("A", "B", "C")

study24x7
Write a comment
Ratings
0.0
out of 5
0 Ratings
5 study24x7
 
0.0
4 study24x7
 
0.0
3 study24x7
 
0.0
2 study24x7
 
0.0
1 study24x7
 
0.0
Related Pages