public class TestClass{
}
TestClass tc = new TestClass();
// tc 객체는 TestClass 인가?
if(tc instanceof TestClass){
}
TestClass tc1 = new TestClass();
TestClass tc2 = new TestClass();
// tc1과 tc2는 동일한 클래스인가? (클래스명은 몰라도 된다.)
if(tc1.getClass().isInstance(tc2)){
}
String classname = tc.getClass().getName();