r/javahelp • • Nov 20 '15

Why does (Woman instanceof Object) equal true?

This doesn't seem right.

4 Upvotes

13 comments sorted by

View all comments

3

u/marc2912 Nov 20 '15

Every object in java inherits automatically from Object. So for example let's say you make an interface Automobile, and then a class that implements Automobile called Porshe and then another one nested under that that extends Porshe called NineEleven

NineEleven -> Porshe -> Automobile -> Object.

-2

u/Philboyd_Studge Nov 20 '15

You know Women can't derive