• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Assertion

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Explaine me more deeper about assertion.....
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this thread.
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why dont you check the online resources http://www.google.ch/search?q=java+assertion first and then ask more detailed ?


perhaps this is a language thing (german is my mother tongue and your name sounds indian to me) but here is how this question sounds to me: "i am lazy and so i try to let someone else do the hard work"

http://catb.org/esr/faqs/smart-questions.html


pascal
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assertion is a very simple idea.

Basically, they are for exceptions that you believe SHOULD never happen but are not sure that they WILL never happen, and which you know will negatively affect the performance of your application if they DO happen. Assertions are not intended to be caught exceptions. They are used in circumstances in which you would not logically be able to react to the exception, and in which the exception should never occur anyway. The assertion immediately halts the application, so that if the exception ever occurs, there is 100% chance that you will know it happened, and you can then go about debugging it.

Assertions are typically useful for ensuring that changes in one section of the codebase will not cause code in other areas of the code base to fail in such cases as class invarients, and method pre or post conditions. Often, assertions will be ignored when the application is actually distributed.

- Adam
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic