Code Snippets in JAVA Programming and their OUTPUTS-Day 3
CODE SNIPPETS OUTPUT
TYPE CASTING
Concept: Type Casting
class Dog
{
void show()
{
System.
out.
println("Dog");
}
}
class Cat
{
void show()
{
System.
out.
println("Cat");
}
}
class BullDog extends...
More
Code Snippets in JAVA Programming and their OUTPUTS-Day 3
CODE SNIPPETS OUTPUT
TYPE CASTING
Concept: Type Casting
class Dog
{
void show()
{
System.
out.
println("Dog");
}
}
class Cat
{
void show()
{
System.
out.
println("Cat");
}
}
class BullDog extends Dog
{
void show()
{
System.
out.
println("BullDog");
}
}
class Test
{
public static void main(String[] args)
{
Implementing type casting
BullDog
Less