Examveda

Which of the following is the correct way of declaring objects for class Book in Kotlin?

A. Book b1 = new Book()

B. val b1 = Book()

C. var b1 = (Book) new()

D. val b1 = (new) Book()

Answer: Option B


This Question Belongs to Computer Science >> Kotlin Program

Join The Discussion

Related Questions on Kotlin Program

What is Kotlin?

A. A new version of Java.

B. A JavaScript framework.

C. A statically-typed programming language for the JVM, Android, and browser.

D. A database management system.