Practice with Primitive Types 4
Geoffrey Challen // 2021.8.0
Write a snippet of code—not a function—that:
- declares a variable
markof typeCharand initializes it toA - declares a variable named
gradeof typeDoubleand initializes it to98.8 - declares a variable
ageof typeIntand initializes it to42 - declares a variable named
summerIsOverof typeBooleanand initializes it totrue
Note that because Kotlin performs type inference, you can and should solve this problem without explicitly specifying any types.