-
-
int numWords = 0;
-
double lapTime;
-
boolean over65;
-
public static final int HOURS_PER_DAY = 24;
-
The value is:42
The next value will be421
-
Open file C: emp
ewfile.txt
-
-
a == b
-
b != c
-
m > 0 && n > 0
-
x < 0 || y < 0
-
!resp.equalsIgnoreCase("no")
-
s1.compareTo(s2) < 0
-
(Remember, it's not the indentation that Java pays attention to!)
-
CD
-
CD
-
BCD
-
ACD
-
String myWord;
double myDbl;
System.out.print("Enter a word and a double: ");
myWord = kbd.next();
myDbl = kbd.nextDouble();
kbd.nextLine();
System.out.print("Press Enter...");
kbd.nextLine();
-
if (vehicleClass == 1) {
toll = 3.00;
} else if (vehicleClass == 2) {
toll = 4.00;
} else if (vehicleClass == 3 || vehicleClass == 4) {
toll = 5.00;
} else {
toll = 10.00;
}
-
int num;
int sum = 0;
Sop("Enter numbers below:");
num = kbd.nextInt();
while (num > 0) {
sum += num;
num = kbd.nextInt();
}
kbd.nextLine();
-
for (int line = 1; line <= 4; ++line) {
for (int star = 1; star <= line; ++star) {
Sop("*");
}
Sopln();
}
-
- c. 8 bits.
- b. a mouse.
- d. has us tell....
- d. variable.
- b. central processing unit.
- b. compiled Java code....
- c. Scanner kbd = new Scanner(System.in);
- d. public static void ....
- c. main memory is used for programs that are running....
- c. 7 / 4 = 1
- d. 9
- b. for (int i = 0; i <= 10; ....