Hi Rakhee,
In your question MyInner class is not in main method rather it is an inner class defined in the boundries of MyClass1 class.So it can be defined with any access specifiers like public,protected,private,strictfp,static,final abstract.
A method local inner class can only use final or abstract.
I think I helped you out to find your answer.
[ August 01, 2008: Message edited by: Mamta Sharma ]