aspose file tools*
The moose likes Beginning Java and the fly likes assert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "assert " Watch "assert " New topic
Author

assert

rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
I recently saw a program using the assert keyword. Hopefully it looked to me as a statement. Can anyone comment.
assert index > 0 : baseValue ;


Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
This is not available in java. Here is an article discussing how you could CHOOSE to implement it if you want to:
http://developer.java.sun.com/developer/TechTips/1998/tt0217.html#tip1


"JavaRanch, where the deer and the Certified play" - David O'Meara
Julia Reynolds
Ranch Hand

Joined: May 31, 2001
Posts: 123
I read somewhere that we will have assert in JDK 1.4.
Julia
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Originally posted by Julia Reynolds:
I read somewhere that we will have assert in JDK 1.4.
Julia

Perhaps here: http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: assert