• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

assert keydword usage.

 
Zkr Ryz
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
O tried to use the new assert keyword but my code doesn't even compile.
I try a simpler code and still dont compile, could you tell me what's wrong here ?
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..
you are correct. i also get the same error. i tried jdk1.4.0_03 and jdk1.4.1_01 both. none of them works.
regards
maulin
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try
javac -source 1.4 X.java
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and after it compiles run it with java -ea ( or -enableassertions)
[ December 23, 2002: Message edited by: Barry Gaunt ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like to take a look at The September Newsletter.
 
Zkr Ryz
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok , now I got it.
I don't know, this seems kind of odd to me , what is the reason of this -source flag when already have a -target flag ??
Anyway I've never use them before, and now I guess I should start

Thank you all for your answers.
Regards Zkr Ryz.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all.
i will try it when i get back to work
Mary X'Mas.
regards
maulin
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the reason of this -source flag when already have a -target flag ??
Take a look at The javac Documentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic