This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Programmer Certification (SCJP/OCPJP)
Joined: Aug 11, 2006
Feb 17, 2007 14:48:00
will cause assertion enabled in default package or all the packages.
Joined: Dec 20, 2006
Feb 17, 2007 16:11:00
You could test this:
Create a small class (YourClass), in a package (yourpackage), that has an "assert false;" in it's main() method.
Compile the class.
Then run java -cp . -ea yourpackage/YourClass
If the assert is triggered, this indicates that the -ea switch does not mean "switch assert on for default package".
(the default package is the location for classes that are not in a package, and your test class is in the package yourpackage)
OCUP UML fundamental and ITIL foundation
It is sorta covered in the
JavaRanch Style Guide
subject: Assertion doubt
Assertion is not in beta ...
A assertions qustion help about Man's mock!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014