Method Calls
Hi
I'm trying to understand the following snippet of code without much success. I was wondering if someone here could please help me?
The code forms part of an expression (which I've ommitted):
Font.getDefaultFont().getHeight();
What I don't understand is how you can seemingly do multiple method calls from a single class. The Font class being used is javax.microedition.lcdui.Font.
Looking at the documentation, the way I understand it is that getDefaultFont() is a static member of class Font which returns a Font object, and that getHeight() is a public member of the Font class which returns an int.
What confuses me is the syntax. It seems that with this method call, the Font class is able to call 2x methods in a single line of code? What my question really is, what's going on with this line of code? Is it just simply a case of a class being able to call a static member and then a public member or is it a class can call a static member and that a static member can call any public member?
Thanks

