wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assertions" Watch "Assertions" New topic
Author

Assertions

Puja Sinha
Greenhorn

Joined: May 25, 2011
Posts: 27
hi,

Why should we not use assertions to validate arguments to a public method ?

regards,
puja
Shaikh Ali
Ranch Hand

Joined: Jan 26, 2011
Posts: 51
Please refer to this link for an explanation.
Puja Sinha
Greenhorn

Joined: May 25, 2011
Posts: 27
Thanks Faraz. So when we say nonpublic methods can use assertions to test the method arguments, do we include the protected methods in it as well ?
 
 
subject: Assertions
 
Similar Threads
Topic for JavaRanch Journal Article / SCJP Tipline
assertions
Exam for JDK1.4
Assertions
Debugging code