Differentiate runtime errors that cause exceptions and those
Differentiate run-time errors that cause *exceptions* and those that are simply *logic errors*. How can the debugger help with such errors (features/commands)? Convert some//line comment into a comment that uses/**/. Run a Java program from the Windows Command Prompt. Send the value of an arithmetic expression to standard output using print(ln). Then, format that expression using various format specifiers available with printf. Write down expressions containing concatenation, arithmetic, relational (comparison), and logical operators. Then, evaluate those expressions via parentheses, precedence, and associativity.
Solution
1) Exceptions are runtime errors : the scenario when during execution of program the system will not know how to deal with such situation like we have written logic to read a file which is logically syntactically correct but what about if file doesnot exist.
Where as Logical errors : scenario where a logic has been written wrong let say program was to implement addition of two numbers but you write the logic of multiplication of two numbers or subtraction of two numbers.
2) To run a java program from cmd :
javac A.java (first compile the class)
java A (here A we have considered a class name you can write your class name)
