Write a program in java to demonstrate instanceof operator?

class InstanceOf {                 public static void main(String arg[])                 {                                 InstanceOf x=new InstanceOf();                                 System.out.println(x instanceof InstanceOf);                                …

Read More

Write a program in java to demonstrate instanceof operator?

Instanceof True class Instance {                 public static void main(String arg[])                 {                                 Instance x=new Instance();                                 System.out.println(x instanceof…

Read More