Scala Float self() method with example
Last Updated :
29 Oct, 2019
The self() method is utilized to return the same value which has been specified.
Method Definition: (Value).self
Return Type: It returns the same value which has been specified.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 5.4 ).self
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 5 ).self
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...