• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Assertions.

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
What is the difference between
java -ea and
java -dsa
First one says enable assertions at runtime for all classes except for the system calsses
second one says enable assertions in general, but disable in system classes.
Any clarifications....
Also what type of question can be asked in exam ..any tips...?
Thanks
Venkatesh
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by venkatesh rajmendram:
Hi,
What is the difference between
java -ea and
java -dsa
First one says enable assertions at runtime for all classes except for the system calsses
second one says enable assertions in general, but disable in system classes.
Any clarifications....
Also what type of question can be asked in exam ..any tips...?
Thanks
Venkatesh


java -ea
enable assertions at runtime for all classes except for the system calsses . This is true
java -dsa
We are disabling the assertions for the system classes. By default
the assertions are disabled for all classes at runtime. So we have to explicity give -ea to enable the assertions.
Hope it is clear.
-Sanjana
 
venkatesh rajmendram
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh!! I misstyped it , it is supposed to be
java -ea -dsa
and
java -ea
they both mean the same...I guess ...any clarification is appreciable
Thanks
Venkatesh
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Venkatesh,
�ea �dsa and �ea mean the same thing.
Here are some insights into the assertion switches:
1. To make it easy to turn on asserts in all classes except for system classes, -ea does not apply to system classes.
2. Since �ea does not apply to system classes, a separate switch is provided to enable asserts in all system classes. �esa
3. �For symmetry, a corresponding switch is provided to disable asserts in all system classes, though it is not clear that there exists a use for this switch.� -dsa
http://java.sun.com/docs/books/jls/assert-spec.html Appendix II
[ December 23, 2003: Message edited by: Marlene Miller ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic