tro vial wrote:are assertions enabled in IDE's like netbeans and eclipse?
also, read a few things about assertions, but never really used them, are they really useful?
as told by others assertions are disabled by default. even when you use ide's they are disabled. if you are using ide then you have to set the runtime parameter for enabling assertions. in case of netbeans, you can right click the project, then go to run and then in the textbox marked VM arguments you can enable them by writing -ea or -enableassertions and then run the project as you would normally do.
Yes assertions are really great for testing and debugging purposes. in my opinion they should be enabled by default.
So you have to start using batch files etc to start your applications in production? Assertions are a debugging tool, used to find situations that should never occur. During production you don't want them enabled. Therefore it's better to have them disabled by default, and enabled when you explicitly need it - during testing and debugging.