Skip to content
2 marks2024

The following code segment should print “You can go out” if you have done
your homework (dh) and cleaned your room(cr). However, the code has errors.
Fix the code so that it compiles and runs correctly.
boolean dh = True;
boolean cr= true;
if (dh && cr)
System.out.println("You cannot go out");
else
System.out.println("You can go out");

Specimen paper · 2024 · CollegeDekho (mirror of CISCE PDF)

No answer recorded yet

Khojo Papers does not generate answers. This question will show one when a checked answer has been added, with its source stated.

Related questions

From the same topic and chapter, at a similar level.

Related questions