I was thinking if there exists a better/nicer way to negate an instanceof in Java. Actually, I\'m doing something like:
instanceof
if(!(str instanceof String))
You could use the Class.isInstance method:
if(!String.class.isInstance(str)) { /* do Something */ }
... but it is still negated and pretty ugly.