In the previous chapter we have learnt about the IS-A relationship between subclass and superclass. In this chapter we will be learning the programatic implementation of IS-A relationship. Example : IS-A Relationship Verification class FourWheeler extends Vehicle{} class TwoWheeler extends Vehicle{} class WagonR extends FourWheeler{} public class Vehicle { public static void main( String[] args(...)
The post InstanceOf Keyword : Check Whether a Class is instance of Another class appeared first on Learn Java Programming.