This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to read an object that calls multiple methods simultaneously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to read an object that calls multiple methods simultaneously" Watch "How to read an object that calls multiple methods simultaneously" New topic
Author

How to read an object that calls multiple methods simultaneously

David Gill
Greenhorn

Joined: Feb 24, 2005
Posts: 19
Hello,

What is the flow of control for an object that calls multiple methods? Below is an example of what I'm trying to describe.



Does DomainGateway.getFactory() get executed first and the result of that then executes .getDomainInstance() then that result is stored in the customer object?

Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

They execute in order from left to right. General when you are doing more than one call like that, you need the object/value etc that the first method returns in order to call the second method.

Hunter


"If the facts don't fit the theory, get new facts" --Albert Einstein
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

David Gill wrote:Does DomainGateway.getFactory() get executed first and the result of that then executes .getDomainInstance() then that result is stored in the customer object


Yes this is how it is working


SCJP6.0,My blog Ranchers from Delhi
David Gill
Greenhorn

Joined: Feb 24, 2005
Posts: 19
Awesome, thanks for the responses ya'll!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to read an object that calls multiple methods simultaneously