File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Assertions" Watch "Assertions" New topic
Author

Assertions

Siva Sivaraman
Greenhorn

Joined: Sep 26, 2002
Posts: 17
I am new to assertions.In the following code, how is it possible for the constructor C to access validateC()?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Ummm... because you called validateC() from the constructor? It's always possible to access a class method from within a constructor - why not? (There may be complications if the method is later overridden, but that's not possible here since it's private.) I'm not sure what you're asking.


"I'm not back." - Bill Harding, Twister
Siva Sivaraman
Greenhorn

Joined: Sep 26, 2002
Posts: 17
This was the answer, I was looking for

It's always possible to access a class method from within a constructor

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assertions