Question: What does the following print? A. false, false, false B. false, false, true C. false, true, true D. true, false, true E. true, true, false
What does the following print?

A. false, false, false
B. false, false, true
C. false, true, true
D. true, false, true
E. true, true, false
F. true, true, true
interface Vehicle {} class Bus implements Vehicle {} public class Transport { public static void main(String[] args) { Bus bus new Bus(); } } boolean n null instanceof Bus; boolean v bus instanceof Vehicle; boolean b = bus instanceof Bus; System.out.println(n + " " + v + " " + b);
Step by Step Solution
3.47 Rating (150 Votes )
There are 3 Steps involved in it
The code snippet provided is written in Java and is meant to test the use of the instanceof operator ... View full answer
Get step-by-step solutions from verified subject matter experts
