Discussion :: JAVA MCQs
-
What is the output of this program?class increment {public static void main(String args[]){int g = 3;System.out.print(++g * 8);}}
Answer : Option C
Explanation :
Operator ++ has more preference than *, thus g becomes 4 and when multiplied by 8 gives 32.
Be The First To Comment