Object casting allows you to convert an object of one type into another.
Source Code
class Animal {}
class Dog extends Animal {
public static void main(String[] args) {
Animal myDog = new Dog();
Dog dog = (Dog) myDog; // Casting
}
}