Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assertions : have I gone nuts?

 
KR Campbell
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has my mental freezer been unplugged overnight? :


At the command prompt with version 1.4.2:


Output: " As of release 1.4, assert is a keyword and may not be used as an identifier...."

Ken
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might solve your problem to enable assertions on the command line. I found this info on

http://www.javaemerald.com/javamaster/assert.html

so maybe give it a try.
 
KR Campbell
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Rachel, I think that only matters at runtime. I found my mistake. I somehow managed to get my assertion outside my method body. Compiler didn't like it. Mental powercut!

Regards,
Ken
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic