What is the output of this code snippet? double average;
int grade1 =87;
int grade2 =94;
/ / system. out. print("The average is " +(grade1+grade2) / 2.0) ;
System.out.print("The average is " + average) ;
A) Compile-time error
B) The average is 91.5
C) The average is 91.5
The average is 91.5
D) The average is 91.5
The average is 0.0
Correct Answer:
Verified
Q7: Which one of the following statements defines
Q8: What is the output of this code
Q9: Which of the following options declares a
Q10: What is wrong with the following code
Q11: Which option represents the best choice for
Q13: What is the result of the following
Q14: What will be the value stored in
Q15: The assignment operator
A)denotes mathematical equality
B)places a new
Q16: Which statement about number literals in Java
Q17: What is the output of the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents