2 ms·
I actually disagree. instanceof is a fast operation on the JVM and can make code easier to read than equivalent OOP (less hopping around). However, you must be
by pharmakom 4y ago
I actually disagree. instanceof is a fast operation on the JVM and can make code easier to read than equivalent OOP (less hopping around). However, you must be careful that all cases are covered since Java lacks exhaustive pattern matching.