Answers for "isinstance java"

0

isinstance java

public class MyClass{
	//...
}

Object m=new MyClass();
Object o=new Object();
boolean mInstanceOf=m instanceof MyClass;//true
boolean oInstanceOf=o instanceof MyClass;//false
boolean misInstance=MyClass.class.isInstance(m);//true
boolean oisInstance=MyClass.class.isInstance(o);//false
Posted by: Guest on April-04-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language