Ranchers:
Consider this:
This code can successfully be compiled. Two questions from me are:
1. What would be the scenarios that we need to put an inner class into a class? What is the meaning actually having a class in a class? (I mean what is that InnerOne status actually inside the Class)
2. Amazingly, I could even can inlude a static keyword into the inner class declaration? But when I tried to include the static on the root class "One" , I got an error saying something like static modifier is not allowed here. I could understand why it couldn't be put on the root class, but why can we put the static keyword on the inner class? What is then the meaning with a static inner class.
Thanks guys,
Erik
Consider this:
This code can successfully be compiled. Two questions from me are:
1. What would be the scenarios that we need to put an inner class into a class? What is the meaning actually having a class in a class? (I mean what is that InnerOne status actually inside the Class)
2. Amazingly, I could even can inlude a static keyword into the inner class declaration? But when I tried to include the static on the root class "One" , I got an error saying something like static modifier is not allowed here. I could understand why it couldn't be put on the root class, but why can we put the static keyword on the inner class? What is then the meaning with a static inner class.
Thanks guys,
Erik