Possible Duplicate:
In Java, what does a reference to Class.class do?
Firstly apologies for asking this question here. I know it’s a simple question and can probably be answered quite quickly and easily. However searching for Java .class is such a loaded search term it brings up nothing useful.
Having said that, I just started learning Java and I just came across something like this:
Intent i = new Intent(this, ReminderManageActivity.class);
I am not sure, but I think ReminderManageActivity.class is an attribute that gives a string of the name of the class? Is that correct?
I know it sounds stupid, but
classis aClassobject that represent the Class.If you want to instantiate / use some class, and you want to get this class as parametr, you can’t just write
Intent i = new Intent(this, ReminderManageActivity);sinceReminderManageActivityis not an object.