Scala Int longValue() 方法与示例
longValue()方法用于返回指定值的长值。
Method Definition: def longValue(): Byte
Return Type: It returns the long value of the given value.
示例 #1:
// Scala program of Int longValue
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying longValue method
val result = (15).longValue
// Displays output
println(result)
}
}
输出:
15
示例 #2:
// Scala program of Int longValue
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying longValue method
val result = (1586).longValue
// Displays output
println(result)
}
}
输出:
1586