aspose file tools*
The moose likes Beginning Java and the fly likes Method calling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Method calling" Watch "Method calling" New topic
Author

Method calling

Nagesh Vu
Greenhorn

Joined: Mar 18, 2010
Posts: 7
Hi,

I am able to understand the following piece of code:


However, I have difficulty in understanding the following piece of code:


How does one decipher the following:


I understand that the execution is as follows:

which returns an object and on the returned object, getTime() is invoked.
Is my understanding correct?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You understood well. startDate.getTime(), which calls the getTime method of the Calendar class, returns a java.util.Date object. Then the getTime method of the java.util.Date class is called, which returns a long. (I guess it would be the same to call startDate.getTimeInMillis())


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Method calling