Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Fruit {}
- public class Orange extends Fruit {}
- public class Apple extends Fruit {}
- Fruit f = new Apple();
- boolean isOrange = f instanceof Orange; //False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement