Enabling assertion in eclipse
2 posters
Page 1 of 1
Enabling assertion in eclipse
I think all of us(who have tried to compile and run the code in chapter 13, page 307). Here output won't be same as the book states.
The problem is..assertion is not by default enabled in eclipse. So your program would run to negative values without throwing assertion exception.
Don't worry..there is always a way.
Go to eclipse Window>preference>java>installed JRE's>
select the one and click edit. In the window that appears, in the text box named 'Default VM arguments' write "-ea", without the quote. save it and close it.
Now run that program again, isn't it showing the result same as the book?
The problem is..assertion is not by default enabled in eclipse. So your program would run to negative values without throwing assertion exception.
Don't worry..there is always a way.
Go to eclipse Window>preference>java>installed JRE's>
select the one and click edit. In the window that appears, in the text box named 'Default VM arguments' write "-ea", without the quote. save it and close it.
Now run that program again, isn't it showing the result same as the book?
Similar topics
» Preparing Eclipse PDT for Debugging PHP
» How to Install Java FX in Eclipse
» Enabling Bangla/rich text fonts in Opera mini
» Refactoring in Eclipse
» Preparing Eclipse PDT (PHP Development Tool) for PHP
» How to Install Java FX in Eclipse
» Enabling Bangla/rich text fonts in Opera mini
» Refactoring in Eclipse
» Preparing Eclipse PDT (PHP Development Tool) for PHP
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford