posted 10 years ago
Right: the ".class" syntax works with class names, not with objects. That's what the error message "cannot find symbol : class b" is trying to tell you.
If you need a Class object for some random object, call its getClass() method. That doesn't work for primitives, though (like a boolean), but it does work for objects (like a Boolean).