Home »
MCQs »
Scala MCQs
The correct output of the below code block is | Scala Question 2
16. The correct output of the below code block is -
object MyClass {
def main(args: Array[String]) {
var a : Float = 454.32138988f
var b : Double = a;
printf("a = " + a + "\t b = " + b)
}
}
- a = 454.32138988 b = 454.32138988152344
- a = 454.32138 b = 454.3213806152344
- a = 454.32138 b = 454.32138
- error
Answer: A) a = 454.32138988 b = 454.32138988152344