File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is the differenca Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What is the differenca" Watch "What is the differenca" New topic

What is the differenca

Krupa Kumar

Joined: Mar 03, 2001
Posts: 2

Can some one explain the difference between the following two options?
1. This code does not compile
2. Compiles, but generates compiler error.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

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)"
[This message has been edited by JUNILU LACAR (edited March 03, 2001).]

Junilu - [How to Ask Questions] [How to Answer Questions]
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
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 ...
I agree. Here's the link:
subject: What is the differenca
It's not a secret anymore!