Given:
Which action fixes the compiler error?
At line 17, add throws AccessViolationException
At line 13, add throws LogFileException
At line 2, replace throws LogFileException with throws AccessViolationException
At line 7, insert throw new LogFileException ();
Which three statements are true about the structure of a Java class? (Choose three.)
A class cannot have the same name as its field.
A public class must have a main method.
A class can have final static methods.
A class can have overloaded private constructors.
Fields need to be initialized before use.
Methods and fields are optional components of a class.
Given the code fragment:
What is the result?
The sum of 4 numbers is: 10
A compile time error occurs.
The sum of 5 numbers is: 10
The sum of 5 numbers is: 15
1:2:3:4:5:
1:2:3:
Compilation fails.
An ArrayOutOfBoundsException is thrown at runtime.