• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

doubt in kathy seirra bbok

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the differenc between compilations fails, compilation without error,compilation without warning and compiles with warning
 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that may be clearer with an understanding of what compilers do. This is very simplified, but it gets right to the point.

Compilers have two general kinds of problems..... warnings and errors.

A warning is something that it doesn't like but it will let it go by and compile it but it has some kind of a problem with it.

An error is a problem that the compiler seriously doesn't like and says, "nope! I won't accept this!".

Some code can compile with warning but still run.

Typically, when code causes an error the compilation will not complete.

So there are four possibilities here:

Compile with errors and warnings,
Compile with errors only,
Compile with warnings only, (might run)
Compile with no warnings or errors (might run, depends on your coding!)
 
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy ranchers!


Some code can compile with warning but still run.
(...)
Compile with warnings only, (might run)


This is wrong. Or at least misleading.
It should be "All code that compiled with warning will still run."
A compile with warning is still a successfull compile, and the code will run.
Compilation with a warning is for example when you use generic classes non-generically:

You can compile and run this code.
Compiler warnings are NO compiler failures. They only want to indicate that there might be an exception at runtime


Bu.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic