Which of the following statements contains an error?
1. system.out.print("/tab Age in Minutes: " + ageInMinutes +"/n");
2. system.out.print("t/ Age in Minutes: " + ageInMinutes + "n/");
3. system.out.print("/t Age in Minutes: " + ageInMinutes + "/n");
a. 1 only
b. 2 only
c. 3 only
d. 1 and 2 only
e. 2 and 3 only
I thought my best answer is A is that correct
5 answers
nope. "t/" and "n/" are also an errors
ohh so 1 and 2 are both errors
yep
actually, #1 is syntactically correct, but will print
ab Age in Minutes: ...
ab Age in Minutes: ...
Which of the following statements does not contain an error?
1. string firstName= in.next();
2. string lastName= in.nextline();
3. system.out.print("\n");
a. 1 only
b. 2 only
c. 3 only
d. 1 and 3 only
e. 2 and 3 only
is the answer 1 and 3
1. string firstName= in.next();
2. string lastName= in.nextline();
3. system.out.print("\n");
a. 1 only
b. 2 only
c. 3 only
d. 1 and 3 only
e. 2 and 3 only
is the answer 1 and 3