Yesterday I was just to add a file in package which comes with java. Like java.lang I wrote following code
and got following error when tried to run that class.
I want to know that how they achieved package level restriction? I know that some may feel this question absolute baseless because naming a package which is already there makes no sense. But i just want to know that what really happens and how they have done it? If someone can help me that will be very helpful to me.