Java

INDEPENDENT TOPIC 01 – TYPES OF ERRORS

 

LESSON WORK

 

 

QUESTION 1

What are the three types of errors?

 

QUESTION 2

Which type of error is described below?

 

a)    You forget to put a semi-colon at the end of an assignment statement.

b)    You place a semi-colon at the end of an if-statement line.

c)    You use the wrong formula to calculate the value of a variable.

d)    You have a calculation that involves a division.  You end up dividing by zero.

e)    You try to access the fifth character of a String that only has four characters.

f)     You forget to match your class name to the filename.

g)    Your loop goes on forever because you forgot to update the control variable.

h)   You try to assign a double value to an integer variable.