In general, the best way to answer that quickly is to write a piece of code (of course only if you have a compiler at hand
Here we go:
1. Can a class have same name as the package included in the package statement ? The following code compiles fine
2. Can any kind of nested or inner class wheather inside or outside method have same name as the nesting class ? Neither of the following inner/nested classes are legal.