Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the differenca  RSS feed

 
Krupa Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can some one explain the difference between the following two options?
1. This code does not compile
2. Compiles, but generates compiler error.
Regards
Krupa
 
Junilu Lacar
Sheriff
Posts: 10880
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure about #2? If a compiler error is generated, the code couldn't have compiled successfully. Maybe you mean "but generates a runtime error (or exception)"
J.Lacar
[This message has been edited by JUNILU LACAR (edited March 03, 2001).]
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think the difference is:
1. No output *.class file is created
2. May be warnings (errors in java) but *.class will be created.
I think warnings in Java compilers are considered errors.
Some examples include deprecated method warnings, bad access modifiers ...
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!