Quantcast
Channel: Learn Java Programming
Viewing all articles
Browse latest Browse all 39

InstanceOf Keyword : Check Whether a Class is instance of Another class

$
0
0

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.


Viewing all articles
Browse latest Browse all 39

Trending Articles