Technically you could do that in Java because all classes extend Object. But that approach should be avoided at all costs.

Any time when you cannot be 100% percent certain of what is contained...