I was thinking if there exists a better/nicer way to negate an instanceof in Java. Actually, I'm doing something like:
if(!(str instanceof String)) { /* do Something */ }
But I think that a "beautiful" syntax to do this should exist.
Does anyone know if it exists, and how the syntax look like?
By beautiful, I might say something like this:
if(str !instanceof String) { /* do Something */ } // compilation fails