Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

assertions  RSS feed

 
Jui Mahajan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i have to disable (or enable) 2 classes, say class 1 and class 2, can i do it like this :-
java -da:class1,class 2
or i do like this:
java -da:class1
java -da:class2
Jui
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you have enable assertion because by default assertion is off:
java -ea Program
Now to disable in one class Test:
java -ea -da:Test Program
To disable in two classes Test and Test1
java -ea -da:Test -da:Test1 Program
Thanks
Barkat
 
Jui Mahajan
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. That really helped. I have my exam tomorrow and I am feeling really tensed.
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure you will do great. Best of luck.
Barkat
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!