Multiple Choice
Example Code Ch 02-2
import java.util.Scanner;
public class Questions33_34
{
public static void main(String[] args)
{
int x, y, z;
double average;
Scanner scan = new Scanner(System.in) ;
System.out.println("Enter an integer value") ;
x = scan.nextInt() ;
System.out.println("Enter another integer value") ;
y = scan.nextInt() ;
System.out.println("Enter a third integer value") ;
z = scan.nextInt() ;
average = (x + y + z) / 3;
System.out.println("The result of my calculation
is " + average) ;
}
}
-Refer to Example Code Ch 02-2. This code computes
A) The correct average of x, y, and z as a double
B) The correct average of x, y, and z as an int
C) The average of x, y, and z as a double but the result may not be accurate
D) The sum of x, y, and z as an int
E) The remainder of the sum of x, y, and z divided by 3
Correct Answer:

Verified
Correct Answer:
Verified
Q57: Given two points in an applet represented
Q58: If the String major = "Computer Science",
Q59: A Java variable is the name of
Q60: As presented in the Software Failure section
Q61: In order to generate a random number,
Q63: Of the following types, which one cannot
Q64: Write the paint method for an applet
Q65: Which library package would you import to
Q66: What is wrong with the following assignment
Q67: The values of (double)5/2 and (double)(5/2) are