15,000 Jobs Available in:
Java, ASP, C#, PHP, SQL, SAP, MySQL and many more.
- Class Quick -
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Assertions" Watch "Assertions" New topic
Author

Assertions

Ankur kothari
Ranch Hand

Joined: Sep 06, 2009
Posts: 531
Hi all

In K&B it is written that it is inappropriate to assert parameters of a public method or inappropriate to assert some compile time arguments......i tried all these things are compiling

does this mean that this inappropriate means that they can be used but shouldn't be used because it would be a wrong practice....
Francisco Montes
Ranch Hand

Joined: Sep 30, 2009
Posts: 30
Because it will be not a good practice.


SCJP 1.6
Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 377
Inappropriate means it is legal and will compile but not a good practice and not recommended by Sun.

This message was edited 1 time. Last update was at by Siva Masilamani



SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
Ankur kothari
Ranch Hand

Joined: Sep 06, 2009
Posts: 531
ya..even i thought so
 
 
subject: Assertions
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture