Short, a 16-bit signed integer (equivalent to Java’s short primitive type) is a subtype of scala.AnyVal. The ==(x: Int) method is utilized to return true if this value is equal to x, false otherwise.
Method Definition: def ==(x: Int): Boolean
Return Type: It returns true if this value is equal to x, otherwise false.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.