I have a type of Object variable called obj (Object obj). I'm using obj.getClass() and I want to check if the returned class is actually a certain class, in my case a class named Student. How do I do that?
I tried obj.getClass().isInstance(Student)
but it tells me that Student cannot be resolved to a variable. Also yes I've done my research and have found similar questions on SO but for some reason nothing I've done works.