Originally posted by Jayashree M:
Suppose we have something as follows:
How does the evaluation take place, if say suppose all three methods return a String?
best way to find out is to try it out...
but to help you answer your question...
the object that is returned by obj.method1() will require method2() as one of it's methods, and the object that is returned by method2 will require that method3() is one of its methods...
otherwise it will not compile...
an example to look at...
just comment out
to get the example to compile...
and you can see how it evaluated...