Question: What is the output when the following code is run? char sport = ' n ' ; char outdoor = ' n ' ; if
What is the output when the following code is run?
char sport n;
char outdoor n;
ifsport n
ifoutdoor n
System.out.printlnNo sport.";
else
ifoutdoor n
System.out.printlnIndoor sport.";
else
System.out.printlnOutdoor sport.";
a
Outdoor sport.
b
No sport.
c
Indoor sport.
d
No output will be displayed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
