• 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

Regarding Assertions

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am a Java Programmer. i didn't come across with the Assertion any where.
i am confused with this Assertion mechanism. can anybody explain me in their own words about this..where to use and how to use this...i couldn't able to understand it from the Books....

thanks in Advance
regards

krishna bulusu.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Assertion is like a Debugging Tool. it will help you to find the Bug at the runtime. for example you have program where you have some variable . you want to kno the valu of the variable at runtime . BEFORE ASSERTION what we do is going System.out.println and making console dirty,then we will find the value of the Variable. After Development we have to remove all the S.o.p in the program .OK after some days when we are going for maintaince mode we have to add s.o.p again. it is tedious prcess and you may find lot of Bug. SO sun came with new keyword in SCJP 1.4 which will take care of debugging process. so u can on the assertion by using(-ea)option at the Runtime. when you dont want assertion you can leave it off ,because by default assertion id off. i am not going inside the syntax of assertion this is only 3000 feet high level overview. if you have any comments .WELCOME
reply
    Bookmark Topic Watch Topic
  • New Topic