I am new to Android and may be what i am asking is very silly one..so please forgive me
To create AlertDialog.... standard way is to call
AlertDialog alertDialog = new AlertDialog.Builder(Context here....).create();
then
alertDialog.show();
But i tried via 3 ways...
way 1
AlertDialog alertDialog = new AlertDialog.Builder(MainActivity.this).create();
way 2
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
way 3
AlertDialog alertDialog = new AlertDialog.Builder(this.getApplicationContext()).create();
First 2 works fine but 3rd one gives illegalSTateException......
so my query is why it is giving that????
Thanks