NEW
Font size
WorksheetsWeek 7
Total questions: 10
Worksheet time: 5mins
the memory location where the computer stores the list of memory locations to which the system must return when methods end
Call stack
Assertion
Catch or Specify Requirement
a Java language feature that can help detect logic errors and debug a program.
Call Stack
Assertion
Checked Exception
a premature, unexpected, and inelegant end to a program.
Crash
Runtime error
Try catch
- statement that sends an Exception out of a block or a method so it can be handled elsewhere.
Exception Statement
Catch Statement
Throw Statement
exceptions that a programmer should plan for and from which a program should be able to recover.
Unchecked Exceptions
Checked Exceptions
Multithreaded
Which of the following does the same thing as the BufferedWriter class newLine() method?
System.out.println()
Path.getProperty("line.separator")
System.getProperty("line.separator")
Which of the following statements is true?
Exceptions are more serious than Errors.
Errors are more serious than Exceptions.
Errors and Exceptions are different but equally serious.
The code within a finally block executes when the try block ____________.
identifies one or more Exceptions
does not identify any Exceptions
either a or b
neither a or b
A try block includes all of the following elements except ____________.
the keyword try
the keyword catch
curly braces
statements that might cause Exceptions
Which of the following statements creates a Path named p to a FileStream named f?
Path p = new Path("C:\\Java\\MyFile.txt");
Path p = f("C:\\Java\\MyFile.txt");
Path p = f.getPath("C:\\Java\\MyFile.txt");
Path p = getPath(new f("C:\\Java\\MyFile.txt"));
