What are the rules for the Type Casting in Java?