How to determine an object’s class?

if (obj instanceof C) {
//your code
}

Leave a Comment