-
Notifications
You must be signed in to change notification settings - Fork 22
Kotlin Basics : Comparison Operators
Devrath edited this page Dec 24, 2023
·
2 revisions
val conditionCheck = 25 > 21
println("Condition Check Result:-> $conditionCheck")
var firstValue = Student("Mahesh",22)
var secondValue = Student("Mahesh",22)
// DoubleEqual => Check if both variables are equal by value
val resultValueOne = firstValue==secondValue
println("DoubleEqual:-> $resultValueOne")// Result: true
// TripleEqual => Check if both variables are equal by reference
val resultValueTwo = firstValue===secondValue
println("TripleEqual:-> $resultValueTwo")// Result: false