Exam 2: Data and Expressions
Exam 1: Introduction64 Questions
Exam 2: Data and Expressions67 Questions
Exam 3: Using Classes and Objects49 Questions
Exam 4: Writing Classes53 Questions
Exam 5: Conditionals and Loops38 Questions
Exam 6: More Conditionals and Loops35 Questions
Exam 7: Object-Oriented Design44 Questions
Exam 8: Arrays45 Questions
Exam 9: Inheritance49 Questions
Exam 10: Polymorphism40 Questions
Exam 11: Exceptions39 Questions
Exam 12: Recursion55 Questions
Exam 13: Collections60 Questions
Select questions type
In order to generate a random number, you must use Math.random().
(True/False)
4.9/5
(40)
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
(Multiple Choice)
4.8/5
(44)
Of the following types, which one cannot store a numeric value?
(Multiple Choice)
4.9/5
(36)
Write the paint method for an applet so that it contains 4 concentric circles (each circle is inside the previous circle), where the largest circle is bounded by a 400x400 box and the smallest is bounded by a 100x100 box. Each circle is centered on an applet that is 400x400. Make each circle a different color of your choice.
(Essay)
4.8/5
(37)
Which library package would you import to use the class Random?
(Multiple Choice)
4.8/5
(44)
What is wrong with the following assignment statement? Assume x and y are both String objects.
String z = x.equals(y);
(Essay)
4.9/5
(42)
Showing 61 - 67 of 67
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)