Are these right?

Short Run Printing

Different types of errors..Yes, I’m studying for a Java test tomorrow. That’s why I’m asking so much.

Umm anyways.

Are these correct?

Logic error - An error that will only change what you display; the program will still run without problem.
(e.g. adding 1 instead of subtracting 1)

Compile-time error - Is this also known as Syntax Error? An error that will not allow the program to run at all.
(e.g. forgetting a semicolon in a print line)

Run-time error - An error that will run for a short while, and will stop when it encounters an error.
(e.g. dividing by 0 [?])

Are these right? Please let me know. If you have anything else to add, it would be greatly appreciated.

Java is my worst class. :)


4 Responses to “Are these right?”

  1. JimPettis — May 29, 2010 @ 9:41 am

    not exactly

    logic error - does not necessarily change how the program will display, but *does* mean that the program does not operate as intended. For example, an infinite loop is a "logic error". Logic errors *can* result in run-time errors (for example, a loop that divides by the loop variable and counts down to zero). The run-time error of dividing by zero is *not* the same as the logical loop limit error.

    compile-time - this is essentially correct

    run-time - essentially, an error that causes the program to halt "improperly" after it successfully compiles and begins running.. Anything which halts a running process unexpectedly is a "run-time error".

    Jim

  2. Evert — May 29, 2010 @ 9:41 am

    Logic error..

    Sounds about right.. interesting way to describe it.. It could affect a lot more than whats being displayed though.. I guess the gist of it is that this is the type of error that will not crash the program (like you said), but simply behave unexpectedly

    Compile-time error — Correct

    Run-time error - An error that occurs while running the program.. The will stop as soon as you hit the error

  3. Partha S — May 29, 2010 @ 9:41 am

    I tell you what u need, you need a basic book of java programing. Don’t shy, buy it. You know internet infos can go wrong but books are always r8.

  4. ashwini — May 29, 2010 @ 9:41 am

    ya perfecyly right……

Leave a Reply

Powered by Yahoo! Answers
Powered by WP VideoTube