• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Runtime & Compile Time Errors . PLS HELP !!!!!

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fellow ranchers,
I have a problem with a concept which is getting a few wrong answers in the Mocks . I will be extremely grateful if any of can take the trouble to clear the same . It is:-
There are questions with options that the a) code will not compile at runtime : b) the code will give runtime errors . Now when I know that the code is erroneous & will not work , how do I differentiate between these 2 options, that is what sort of errors are caught at compile time & what sort of errors is the responsibility of the runtime environment(JVM) . Please can someone explain .
Thanks in advance.
Regards,
Kaushik

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kaushik banerjee:
Hi fellow ranchers,
I have a problem with a concept which is getting a few wrong answers in the Mocks . I will be extremely grateful if any of can take the trouble to clear the same . It is:-
There are questions with options that the a) code will not compile at runtime : b) the code will give runtime errors . Now when I know that the code is erroneous & will not work , how do I differentiate between these 2 options, that is what sort of errors are caught at compile time & what sort of errors is the responsibility of the runtime environment(JVM) . Please can someone explain .
Thanks in advance.
Regards,
Kaushik


Hello Kaushik,
Compile errors have to do mostly with syntactical and rules of the language. In addition to that, if the complier is smart, it will also catch obvious errors in program logic or potential boundary and mathematical violations. Compile errors will prevent you from generating class files or executable units.
Once your program is free from compilation errors, it might or might not generate any error. An error caught by JVM during program execution is a runtime error.
Regards,
Lam

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I think JLS will solve the problem. I don't remember which chapter but i think 15 is the one
regards
Denish
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic