Which statement about the following class is correct?
1 public class PoliceBox {
2 String color:
E long age
a public void PoliceBox,
5 color Lue!
5 age - 1200;
3 public static void main(String []time
var p = new PoliceBox,
L var q = new PoliceBox();
1 p.color = "green"
L p-age - 1400
g p-q
L System.out_println("Ql="+q. color.
1 System.out_println("Q2="+q.age
L System.out_println("P1="+p.color
1 System.out_println("P2="+p.age
L
A Line 12 does not compile.
8 Line 4 does not compile.
c It prints P2=1400.
[ t prints P1=null
3 It prints Q2=1200.
3 Itprints Q1=blue.
G None of these.
H Line 13 does not compile.
,Which statements about the following class are true?
1 public class River
2 int Depth = 1
s float temp - 50.0:
a public void flow
s for (int i-0
s int depth - 2
depths
temp--
10 System.out.println(depth
1 System.out.println(temp
L public static void main(String.. s
L new River().flow
Each correct answer represents a complete solution. Choose all that apply.
A The program prints 500 on fine 11.
8 The program prints 4 on line 10.
c The program prints 3 on line 10.
[ Line 10 generates 3 compiler error.
3 Line 7 generates 2 compiler error.
F Line 6 generates a compiler error.
G Line 3 generates a compiler error.
H ‘The program prints 49.0 on fine 11.
, Which of the following statements are true about this code?
var blocky
squirrel \s
pigeon \
termite
System.out.print (blocky
Each correct answer represents a complete solution. Choose all that apply.
v oA D It outputs
two lines.
8 It outputs three lines.
c it outputs four lines.
v D D There is one line with trailing whitespace.
3 There are two lines with trailing whitespace.
Which of the following expressions, when inserted independently into the blank line, allow the code to compile?
public void printHagicData
var magic = 5
System_out.println(magic):
Each correct answer represents a complete solution. Choose all that apply.
[ 5.291.2
c 3.130_
o 13290
1 public class PoliceBox {
2 String color:
E long age
a public void PoliceBox,
5 color Lue!
5 age - 1200;
3 public static void main(String []time
var p = new PoliceBox,
L var q = new PoliceBox();
1 p.color = "green"
L p-age - 1400
g p-q
L System.out_println("Ql="+q. color.
1 System.out_println("Q2="+q.age
L System.out_println("P1="+p.color
1 System.out_println("P2="+p.age
L
A Line 12 does not compile.
8 Line 4 does not compile.
c It prints P2=1400.
[ t prints P1=null
3 It prints Q2=1200.
3 Itprints Q1=blue.
G None of these.
H Line 13 does not compile.
,Which statements about the following class are true?
1 public class River
2 int Depth = 1
s float temp - 50.0:
a public void flow
s for (int i-0
s int depth - 2
depths
temp--
10 System.out.println(depth
1 System.out.println(temp
L public static void main(String.. s
L new River().flow
Each correct answer represents a complete solution. Choose all that apply.
A The program prints 500 on fine 11.
8 The program prints 4 on line 10.
c The program prints 3 on line 10.
[ Line 10 generates 3 compiler error.
3 Line 7 generates 2 compiler error.
F Line 6 generates a compiler error.
G Line 3 generates a compiler error.
H ‘The program prints 49.0 on fine 11.
, Which of the following statements are true about this code?
var blocky
squirrel \s
pigeon \
termite
System.out.print (blocky
Each correct answer represents a complete solution. Choose all that apply.
v oA D It outputs
two lines.
8 It outputs three lines.
c it outputs four lines.
v D D There is one line with trailing whitespace.
3 There are two lines with trailing whitespace.
Which of the following expressions, when inserted independently into the blank line, allow the code to compile?
public void printHagicData
var magic = 5
System_out.println(magic):
Each correct answer represents a complete solution. Choose all that apply.
[ 5.291.2
c 3.130_
o 13290