UC - Unnecessary Casts
Checks for the use of type casts that are not necessary.
Wrong
class Elephant extends Animal {
void func () {
int i;
float f = (float) i;
Elephant e1;
Elephant e2 = (Elephant) e1;
Animal a;
Elephant e;
a = (Animal) e;
}
}
Tip: Delete unnecessary cast to improve readability.