This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
There are two different problems here, but they're both variations on a theme.
methodbb() is an instance method of class aa.bb; therefore you need an instance of this class to call the method. If it were a static method, you could call it as
but since it's an instance method, you need an instance, like in your variable "b" in main.
Now the other line: methodaa() is an instance method of aa, so you need an instance of aa to call it. Because bb is a static class, there's no instance of aa associated with it. If bb were not marked static, this would work -- although then your initialization of variable b wouldn't work as written, because when constructing a bb you'd need to supply an aa.