hi val thanks for the link but here my point is as per Question , expressions should prove that obj is instance of B and not instance of A and not instance of C
By proving instance of B and Not instanceof C left does not prove Obj is not instanceof A ,
as stated in answers ,
its True that answer c proves Obj is instaceof B and not instance of C , But it does not prove B is not an instance of A as asked in Question which expressions identifies whether the object referred by obj was created by instantiating class B rather then class A,C and D?
i think expression
(obj instanceof B) && ! ( obj instanceof A || obj instance of C ) can only prove that obj is an instance of B rather than Class A , C and D.