Comparing characters and digits in an application

Report a typo

You are developing a Kotlin application where you need to compare characters and their numerical equivalents. In this context, fill the blanks in the code provided so that it correctly compares a character to its unicode equivalent, also, compares two digits as their numerical values and prints their comparison results.

Fill in the gaps with the relevant elements
fun main() {
    val chA:  = 'A'
    val chB: Char = 'B'
    println("Unicode comparison: ${chA.() < chB.toByte()}")
    val ch1: Char = '1'
    val ch2: Char = '2'
    println("Decimal comparison: ${ch1 < ch2}")
}
toByteChar
___

Create a free account to access the full topic