I found out one interesting thing that we can have a class inside an interface and an interface inside a class. Please could anyone tell me the concept behind this. I am very confused. Please explain the concept with some practical example. Thanks a lot.
Find a copy of a book like Bruce Eckels' Thinking in Java (older editions legally available to download-try here), which has a chapter about inner classes in.
But don't expect it to be easy to understand . . .