Question: Given the following structure, which snippets of code return true? (Choose three.) A. new Coral() instanceof Friendly B. null instanceof Object C. new Coral() instanceof
Given the following structure, which snippets of code return true? (Choose three.)

A. new Coral() instanceof Friendly
B. null instanceof Object
C. new Coral() instanceof Object
D. new Fish() instanceof Friendly
E. new Whale() instanceof Object
F. new Dolphin() instanceof Friendly
interface Friendly {} abstract class Dolphin implements Friendly {} class Animal implements Friendly {} class Whale extends Object {} public class Fish {} class Coral extends Animal {}
Step by Step Solution
3.32 Rating (146 Votes )
There are 3 Steps involved in it
To answer which code snippet returns true lets examine each snippet in the context of the provided class structure A new Coral instanceof Friendly Cor... View full answer
Get step-by-step solutions from verified subject matter experts
