Java method calling
posted 8 years ago
If you start with Classname, then you are invoking its static method1 This method1 returns something which has a method called method2. You are calling method2 on whatever that is. Whoever coded that ought to have provided links in the Javadoc comments for whichever class it is to explain what its method1 returns. Whoever coded that class should have given an explanation about what method2 does.And Amit Ghorpade is right about displayed names.
I think this needs a beginner's explanation; it is really a beginner's question.Originally posted by Laxmikant Ruikar:
Classname.MethodName1() represent one object of class, and you are invoking MethodName2() method on it.