you can interpret this as follows
d5 instanceof Double -- > check that if variable named d5 is the instance of the class Double ?
here answer is true
instanceof always returns boolean and if it cannot compare object instance with class (e.g
String str; str instanceof Integer) it will throw ClassCastException at runtime....
it can be useful to compare instances of the same hierarchy with their respective classes but not for different class hierarchies....