Question 1 of 10
A box office stores remaining seats. What text does this Java code display?
int seats = 18;
System.out.print(seats == 18);
- A. 18
- B. true
- C. false
- D. seats == 18
A box office stores remaining seats. What text does this Java code display?
int seats = 18;
System.out.print(seats == 18);
A clerk checks leftover stickers. What text does this Java code display?
int leftover = 7;
System.out.print(leftover != 7);
A ride measures a guest in centimeters. What text does this Java code display?
int height = 14;
System.out.print(height < 20);
System.out.print(height > 20);
A quiz program stores one score. What text does this Java code display?
int score = 70;
System.out.print(score >= 70);
System.out.print(score > 70);
Ribbon is cut into 5-centimeter pieces. What text does this Java code display?
int ribbon = 23;
System.out.print(ribbon / 5 == 4);
System.out.print(ribbon / 5 == 4.6);
A lab mixes a measured volume. What text does this Java code display?
int whole = 11;
double mix = 11.0;
System.out.print(whole / 2 == 5);
System.out.print(mix / 2 == 5);
Two shipping labels are created. What text does this Java code display?
String p = new String("oak");
String q = new String("oak");
String r = p;
System.out.print(p == q);
System.out.print(p == r);
A marker letter is stored as char. What text does this Java code display?
char first = 'M';
System.out.print(first < 'Q');
System.out.print(first == 'M');
Which statement compiles and stores a boolean result of a comparison?
int span = 24;
A counter is one less than overflowing a 32-bit int. What text does this Java code display?
int fuel = 2147483647;
fuel = fuel + 1;
System.out.print(fuel > 0);