Practice with Primitive Types 4
Write a snippet of code—not a function—that:
- declares a variable
mark
of typeChar
and initializes it toA
- declares a variable named
grade
of typeDouble
and initializes it to 98.8 - declares a variable
age
of typeInt
and initializes it to 42 - declares a variable named
summerIsOver
of typeBoolean
and initializes it to true
Note that because Kotlin performs type inference, you can and should solve this problem without explicitly specifying any types.