instanceof – incompatible conditional operand types

A related issue that I have come across recently (and which led me to this page, before I figured out what was going on) is that the Eclipse environment can report “Incompatible conditional operand types” in an ‘instanceof’ expression erroneously due to a missing ‘import’ statement for the type on the right of the ‘instanceof’. … Read more

How does Cloneable work in Java and how do I use it?

The first thing you should know about Cloneable is – don’t use it. It is very hard to implement cloning with Cloneable right, and the effort is not worth it. Instead of that use some other options, like apache-commons SerializationUtils (deep-clone) or BeanUtils (shallow-clone), or simply use a copy-constructor. See here for the views of … Read more

Why is Cloneable not deprecated?

There is a bug submitted in 1997 to Java Bug Database about adding clone() method to Cloneable, so it would no longer be useless. It was closed with resolution “won’t fix” and justification was as follows: Sun’s Technical Review Committee (TRC) considered this issue at length and recommended against taking any action other than improving … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)