Kotlin Basics
Kotlin Basics - Important Points
1. | What is Kotlin? |
---|
A. A programming language
B. A database management system
C. A web framework
D. A markup language
View Answer Discuss Work SpaceAnswer: option a
Explanation:
Kotlin is a programming language designed to be concise, expressive, and safe.
2. | What is the primary use case of Kotlin? |
---|
A. Mobile app development
B. Web development
C. Database management
D. Machine learning
View Answer Discuss Work SpaceAnswer: option a
Explanation:
3. | Which of the following is true about variables in Kotlin? |
---|
A. They must be explicitly declared with a type.
B. They can be implicitly declared without a type.
C. They cannot be reassigned once initialized.
D. They are always mutable.
View Answer Discuss Work SpaceAnswer: option b
Explanation:
4. | Which of the following is a valid identifier in Kotlin? |
---|
A. var
B. my-variable
C. 123foo
D. MyClass
View Answer Discuss Work SpaceAnswer: option d
Explanation:
5. | What is the difference between val and var in Kotlin? |
---|
A. val is immutable while var is mutable.
B. var is immutable while val is mutable.
C. Both val and var are immutable.
D. Both val and var are mutable.
View Answer Discuss Work SpaceAnswer: option a
Explanation: