Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assertions

 
Jui Mahajan
Ranch Hand
Posts: 62
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure you will do great. Best of luck.
Barkat
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic