It's not a secret anymore!*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "What is the differenca" Watch "What is the differenca" New topic
Author

What is the differenca

Krupa Kumar
Greenhorn

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.
Regards
Krupa
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

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).]


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

Joined: Jan 09, 2001
Posts: 1492
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is the differenca
 
Similar Threads
Iimplicit cast
Running code
is khalid wrong?
can we create a class named Object?
Doubt in annotations.