The class Activity is a sub-class of Context so you can use it as parameter in your example.
Now if for instance, you are inside an onClick method (i.e. button) or inside an inner class or an asynctask, using 'this' would not refer the activity itself so you need to use YourActivity.this.
Instead when you see ClassName.class it usually is because you need to specify wich activity, service or whatever you want to start, in that case the parameter type is Class.
For example if you want to start an activity, you use:
Intent intent = new Intent(this or ActivityName.this, AnotherActivityName.class);
For example:
public class MyActivity extends Activity {
....
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
// in this case 'this' refers the current activity instance
// (but of course you can also use MyActivity.this
myAdapter = new ArrayAdapter(this, R.layout.list_item, items);
...
myButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// here you must use ActivityName.this because
// 'this' refers to the OnClickListner instance
Intent intent = new Intent(ActivityName.this, AnotherActivityNameActivityName.class);
startActivity(intent);
}
});
...
}