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

assertion

 
akila sekaran
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can assertion be done at compile time ?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15715
73
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Assertions are used for example to check if the values that you pass to a method are within the range that the method expects. It makes to sense to "do assertions at compile time".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!