記憶度
9問
22問
0問
0問
0問
アカウント登録して、解答結果を保存しよう
問題一覧
1
is an event that occurs during the execution of a program that disrupts the normal flow of instructions.
Exception
2
is the process used to change the normal flow of code execution if a specified exception occurs.
Exception Handling
3
Exceptions that occur during compilation are called
Checked Exceptions
4
The class is not found.
ClassNotFoundException
5
Access to a class is denied.
IllegalAccessException
6
Attempt to create an object of an abstract class or an interface.
InstantiationException
7
A requested method does not exist.
NoSuchMethodException
8
are exceptions that occur during execution. These are also known as runtime exceptions.
Unchecked Exceptions
9
Arithmetic error, such as an integer divided by 0
ArithmeticException
10
Accessing an invalid index of the array
ArrayIndexOutOfBoundsException
11
Assigning a value to an array index that does not match the expected data type
ArrayStoreException
12
Entering a value that does not match the expected data type
InputMismatchException
13
Invalid use of a null reference
NullPointerException
14
Invalid conversion of a string to a numeric format
NumberFormatException
15
Accessing an invalid index (character) of a string
StringIndexOutOfBoundsException
16
It is a block of code that might throw an exception that can be handled by a matching catch block
Try Block
17
is a segment of code that can handle an exception that might be thrown by the try block that precedes it.
Catch Block
18
method can be used to determine Java’s message about the exception.
getMessage();
19
Only one (1) catch block is accepted in a program but there can be multiple try blocks.
False
20
is created by extending the Exception class.
User-Defined Exception
21
contains statements which are executed whether or not an exception is thrown.
Finally Block
22
sends an exception out of a block or a method so it can be handled elsewhere.
Throw statement
23
what's the catch block for a ArithmeticException?
catch(ArithmeticException ex) {
24
is temporary.____ values (stored in variables) are lost when the computer loses its power.
Volatile Storage
25
is permanent. A Java program that is saved on a disk uses a ____?
Non-Volatile Storage
26
is a collection of data stored on a non-volatile device.
Computer files
27
consists of data that can be read in a text editor. Data in a text file is encoded using a scheme.
Text file
28
contains data that is not encoded as text. which means they cannot be understood by viewing them in a text editor.
Binary file
29
the special character used to separate path components.
\
30
creates objects that contain information about files and directories, such as sizes, locations, creation dates, and is used to check whether a file or directory exists
Path class
31
performs operations on files and directories, such as determining their attributes, creating input and output streams, and deleting them.
Files class
32
To use both the Path and Files classes, what statement should be used?
import java.nio.file.*;
33
is a complete path; it does not require any other information to locate a file on a system
Absolute path
34
C:\Java\Chapter8\sample.txt is an example of?
Absolute path
35
- sample.txt - Chapter8\sample.txt - Java\Chapter8 are examples of ?
Relative path
36
is a group of characters that has some meaning.
Fields
37
is a collection of fields that contain data about an entity.
Record
38
It consists of related records.
File
39
If the data is taken from a source (such as a file or the keyboard) and is delivered into a program, it is called an _____
input stream
40
If the data is delivered from a program to a destination (such as a file or the screen), it is called an ______
output stream
41
It is a flow of data.
stream
42
What is the correct syntax of Path class using this directory? C:\Java\Chapter8\sample.txt
Path file Paths.get("C:\\Java\\Chapter8\\sample.txt");
43
Returns the String representation of the Path, eliminating double backslashes
String toString()
44
Returns the file or directory denoted by this Path; this is the last item in the sequence of name elements.
Path getFileName()
45
Returns the number of name elements in the Path
int getNameCount()
46
Returns the name in the position of the Path specified by the integer parameter
Path getName(int)
47
is a memory location into which you can write data, which you can read again later.
Buffer
48
Abstract class that contains method for performing input
InputStream
49
Provides the capability to read disk from files
FileInputStream
50
Abstract class that contains method for performing output
OutputStream
51
Provides the capability to write to disk files
FileOutputStream
52
Handles input from a system’s standard or default output device (usually the monitor)
BufferedOutputStream
53
Contains methods for performing output that never throws an exception
PrintStream
54
Abstract class for reading character streams; the only methods that a subclass must implement are read(char[] int, int) and close()
Reader
55
Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines
BufferedReader
56
Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines
BufferedReader
57
Writes text to a character-output stream, buffering characters to provide for the efficient writing of characters, arrays, and lines
BufferedWriter
58
Checks whether the file exists and whether the program has permission to read the file
READ
59
Checks whether the file exists and whether the program has permission to write to the file
WRITE
60
Checks whether the file exists and whether the program has permission to execute the file
EXECUTE
61
Checks whether the file exists
NONE