What will the following method return if called with an argument of 7?
public class Main { public int transformNumber (int n){ int radix = 2; int output = 0; output += radix*n; /*from w w w . j a v a 2 s.c o m*/ radix = output/radix; if (output<14){ return output; } else{ output = output*radix/2; return output; } else { return output/2; } } }
Select 1 option
Correct Option is : D
The if-else-else is invalid. It should be if , else if, else.