Can we do a ==
on a Class
variable instead of equals
and expect the same result?
For example:
Class clazz = xyz;
Case A:
if(clazz == Date.class) {
// do something
}
Case B:
if(Date.class.equals(clazz)) {
// do something
}
Are Case A and Case B functionally same?