Scala Int equals(arg0: Any) method with example
Last Updated :
30 Jan, 2020
The equals(arg0: Any) method is utilized to return true if the two specified int value is equal else false.
Method Definition: def equals(arg0: Any): Boolean
Return Type: It returns true if the two specified int value is equal else false.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 66 ).equals( 22 )
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 22 ).equals( 22 )
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...