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
Q16: Which statement about number literals in Java
Q59: What is the output of the following
Q60: Which of the following is the
Q61: What does the following statement sequence print?
Q62: What does the following statement sequence print?
Q63: What does the following statement sequence print?
Q65: What is the difference between the result
Q66: What does the following statement sequence print?
Q67: What is the output of the following
Q68: 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