Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Method chaining question



In this example:

object.method1().method2().method3();

What gets evaluated first? Does method 2 use what method 1 returned first for its calculation, or does method 3 return what method 2 returns for its calculation and then evaluate the first method based on what that returned?

If the question is not clear I will clarify.

Thanks, Von