About Kotlin

Following are some of the multiple choice questions on the Kotlin with answers that will help the students in developing their knowledge.

Kotlin MCQ

1. What are Booleans?

  • A question
  • True and False
  • A decision
  • Percents

2. What is the meaning of HTML?

  • Hypertext Making Language
  • Hightext Markup Language
  • Hypertext Markup Language
  • All of above

3. What does AI mean?

  • Artificial Intelligence
  • Artificial Interrogation

4. Why do we need abstract class?

  • to inherited values from other classes
  • to avoid creating instances of the class
  • to not inherit values from other classes
  • to create an instance of the class

5. When you use a data class, what functions will the compiler automatically provide?

  • paste(), toDouble(), notEquals()
  • toString(), cut(), dan isEmpty()
  • equals(), copy, dan toInt()
  • copy(), equals, dan toString()

6. What is the best known programming language ever?

  • Python
  • Kotlin
  • Java
  • SQL

7. Do booleans Need to be Capitalized on the first letter?

  • Yes
  • It depends
  • No
  • All of above

8. Which is the correct data class?

  • class DataUser(name : String, address : String)
  • data class DataUser(name : String, address : String)
  • data class DataUser(val name : String, val address : String)
  • open data class DataUser(val name : String, val address : String)

9. Manakah OS di bawah ini yang Open Source?

  • Android
  • Linux
  • Mac OS
  • Both A & B

10. Which keyword used to create a mutable variable?

  • var
  • val
  • const
  • mutable

11. Which is the right declaration to make a variable with the Character data type?

  • val char = 'ABC'
  • val char = "A"
  • val char = 'A'
  • val char = A

12. Which the right code to declare nullable variable in Kotlin?

  • val text: String = null
  • val text: String? = null
  • val text: nullable = null
  • val text: String

13. What value is 10 until 12

  • 10 11 12
  • 10 11
  • 11 12
  • All is wrong!

14. What is Java used on?

  • Wifi Routers
  • Blu-Ray Players
  • Operating Systems
  • All of above

15. Which ways can you use for an HTML file?

  • .htm
  • .html
  • .tml
  • Both A & B

16. What stores data and its info?

  • databank
  • database
  • datastore
  • datakeeper

17. What language does a database use?

  • QSL
  • SPL
  • LSL
  • SQL

18. Which of these can be used for programming?

  • HTML
  • JavaScript
  • Node.js
  • All of above

19. Survey Insight Stack Overflow 2020: Kotlin menempati urutan diluar 10 besar Most Loved Language by Developer.

  • Yes
  • No
  • Or
  • Both A & B

20. How to get the name from this data class?val dicoding = DataUser(name = "Dicoding Indonesia", address = "Bandung")

  • dicoding.name
  • DataUser.name
  • dicoding.name()
  • DataUser.name()

21. According to code convention, what format used for the function name?

  • camelCase
  • PascalCase
  • snake_case
  • kebab-case

22. JavaScript and jQuery are related.

  • True
  • False

23. Code Editor yang digunakan untuk mengembangkan aplikasi Android Native?

  • Android Studio
  • XCode
  • Sublime Text
  • Notepad ++

24. Elvis operator keyword?

  • ?:
  • ??
  • :?
  • ?.

25. Deklarasi variabel Kotlin yang bersifat immutable?

  • val
  • var
  • const
  • final

26. Mana yang lebih lama?

  • Swift
  • Objective C

27. Bahasa pemrograman apa saja yang bisa digunakan untuk mengembangkan aplikasi Android Native?

  • Java
  • Kotlin
  • PHP
  • Both A & B

28. How to write correct parameters in Kotlin?

  • fun sum(Int: ValueA, Int: valueB)
  • fun sum(Int ValueA, Int valueB)
  • fun sum(valueA: Int, valueB: Int)
  • fun sum(valueA Int, valueB Int)

29. Does programming pay you good money?

  • Yes, programming pays good money.
  • No, people make more money by making burgers.

30. Something that needs a specific value to be True

  • conditionals
  • booleans
  • loops
  • variables

31. Mention the collection in the kotlin!

  • list, set, dan map
  • array, set, dan map
  • list, setter, hashMap
  • arrayList, set, map

32. How do you make the range from a to b?

  • a in b
  • a_b
  • a to b
  • a..b

33. Variable Kotlin by default is nullable.

  • True
  • False

34. Jika ingin variable Kotlin bernilai nullable, ditambahkan?

  • < >
  • !
  • @
  • ?

35. Kotlin bersifat close-source.

  • Ya
  • Tidak

36. Perusahaan di bawah ini yang mengembangkan Operating System (OS) nya sendiri, kecuali

  • Windows
  • Apple
  • Linux
  • Oracle

37. Platform yang memungkinkan mengembangkan aplikasi mobile iOS & Android sekaligus:

  • Flutter
  • React Native
  • iOS
  • Both A & B

38. Mana yang lebih baru/terkini?

  • Kotlin
  • Java

39. Dart merupakan bahasa pemrograman multi-platform yang dikembangkan oleh. . .

  • Google
  • Facebook
  • Oracle
  • Yahoo

40. React Native merupakan bahasa pemrograman multi-platform yang dikembangkan oleh. . .

  • Google
  • Oracle
  • GitHub
  • Facebook

41. In order the values ​​or members of a class can be inherited from other classes, we need to provide a keyword….

  • public
  • extends
  • open
  • final

42. From the following values, which is appropriate to make the property of the animal class ?

  • eat
  • jump
  • weight
  • sleep

43. Method overloading is used ...

  • to inherit a function or method in a class
  • to change the logic of functions that are inherited
  • to provide standard values ​​for function parameters
  • to make the same function name but with different parameters.

44. Classes can be inherited from other classes using keyword...

  • colon ( : )
  • extend
  • implement
  • comma ( , )

45. Which function does not use a lambda receiver (this)?

  • let
  • run
  • with
  • apply

46. A function which can accepts a function as parameter or can returns a function is called ...

  • Extensions
  • Lambda
  • High-Order Function
  • Nullable Receiver

47. By default functions in Kotlin are ...

  • Private
  • Internal
  • Protected
  • Public

48. A container/group of instructions for your program

  • program set
  • proportion
  • function
  • instruction group

49. A program.

  • An Icon
  • A set of instructions for your computer
  • A handbook
  • A blueprint

50. To make something repeat over and over again.

  • repeat
  • loop
  • go-over
  • repeater

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.