can code snippet below be rewritten in a better way
Hi
I have written a simple code snippet I feel there has be other ways in which this code could be improved upon. Any assistance in this regard is highly appreciated
the code is as below:
if (objinstanceof Foo1 ||
objinstanceof Foo2 ||
objinstanceof Foo3 ||
objinstanceof Foo4 ||
objinstanceof Foo5 ||
objinstanceof Foo6){
// do something
}
thanks in advance

