Correct Answer : A
Initially, the main
method of the program is called and the variables m,n
are initialized to the respective values.
Then the method sum
is called which returns a value that is to be stored in the variable o
. Inside the method sum
values of m
and n
are printed. Now, the value of m + n = 90.0
is returned and that will be typecasted to int
and then assigned to o
, which is then printed. As the returned value 90.0
is typecasted to int
, it will become 90
.
Hence the answer is A.