Java Reference
In-Depth Information
15. x = 20
y = 15
z = 6
w = 11.5
t = 4.5
17. a. x ¼ 2, y ¼ 5, z ¼ 6
b. x + y ¼ 7
c. Sum of 2 and 6 is 8
d. z / x ¼ 3
e. 2 times 2 ¼ 4
19. a. System.out.println(); or System.out.print("\n"); or
System.out.print('\n');
b. System.out.println("\t");
c. System.out.println("\"");
21. a. firstName
b. discountedPrice
c. numOfJuiceBottles
d. milesTravelled
e. highestTestScore
23. A correct answer is:
public class Exercise23
{
static final int SECRET_NUM = 11213;
static final double PAY_RATE = 18.35;
public static void main(String[] arg)
{
int one, two, three;
double first, second;
double paycheck, hoursWorked;
one = 18;
two = 11;
three = 3;
first = 25;
second = first * three;
second = 2 * SECRET_NUM;
Search WWH ::




Custom Search