Scala Int toOctalString() method with example
Last Updated :
30 Jan, 2020
The toOctalString() method is utilized to return the octal form of the specified integer value.
Method Definition: def toOctalString: String
Return Type: It returns the octal form of the specified integer value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 5 ).toOctalString
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 9 ).toOctalString
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...