Midterms Flashcards

1
Q

Process of identifying and rectifying errors in a program

A

Debugging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Typical debugging process

A
  • Examining error symptoms
  • Identifying the cause
  • Fixing the error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fully understand the problem before making changes

A

Understanding the problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Works backward through the code to find out how it happened.

A

Backtracking / Backward Debugging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can give insights into how the code functions

A

Debugging Tools

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Example of debugging tools

A

Chrome DevTools, Testsigma, dbForger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The point in the code to temporarily stop the execution of the program to inspect the state of its functionality.

A

Breakpoints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

To manually move through each line of code

A

Stepping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Code is divided into
halves and systematically narrowing the bug location.

A

Binary Search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Analogy for explaining an object like a rubber duck to someone else

A

Rubber Ducking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A

Log Analysis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Group error reports into classes of related bugs as they often share common causes or patterns

A

Clustering Bugs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Documenting the process and the solutions

A

Take Notes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Unexpected or error condition encountered in programming

A

Exception

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

object-oriented techniques that manage or resolve errors

A

Exception Handling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Unplanned exception occurs during a program’s execution

A

Runtime Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Unplanned exception discovered during program compilation

A

Syntax Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

represents more serious errors that a program usually might not recover from

A

Error class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Represents less serious errors that indicate unusual conditions that arise

A

Exception class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The base class for exceptions thrown while accessing data from files

A

IOException

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Only detected during the execution of the application.

A

RuntimeException

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Raised whenever a wrong mathematical operation appears

A

ArithmeticException

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Thrown when an index used in arrays, lists, or strings is invalid.

A

IndexOutOfBounds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Indicates that an array has been accessed with an illegal
index

A

ArrayIndexOutOfBounds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Indicates that the element being requested does not exist.
NoSuchElementException
26
Occurs when the user does not provide the proper type of input or input is out of range
InputMismatchException
27
indicates that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
VirtualMachineError
28
thrown when there is insufficient space to allocate an object.
OutOfMemoryError
29
indicates unexpected internal error has occurred in the Java Virtual Machine
InternalError
30
Meaning that it ended prematurely with an error.
Crash
31
The list of error messages, which shows each method called as the program ran
Stack Trace
32
Placed when a code might cause an error. It is the block of code a programmer might attempt to execute while acknowledging that an exception might occur
try block
33
Code that handles an exception that might be thrown by the try block that precedes it
catch block
34
Sends an Exception object out of a block or method so it can be handled elsewhere
Throw statement
35
Executes whether or not the preceding try block identifies an Exception. Used to perform cleanup task
finally block
36
Collection of data stored on a nonvolatile device or a permanent storage
Computer File
37
Contain data that can be read in a text editor as the data is encoded using a scheme. Can be data file or application
Text Files
38
Contain data items that have not been encoded as text. Ex: music, images, .class extension
Binary Files
39
Can be used to store a permanent file
Root Directory
40
Complete list of the disk drive and the hierarchy of directories in which a file resides
Path
41
Path identifier for Windows
Backslash "\"
42
Used as the delimiter in the Solaris
Forward slash "/"
43
Creates objects containing information about files and directories, including their locations, sizes, creation dates, and whether they exist
Path Class
44
Performs operations on files and directories, including deletion, determining their attributes, and creating input and output streams.
Files class
45
Can be included in a Java program to use both the Path and Files classes.
java.nio.file.*
46
An object that creates other objects.
Factory
47
Is considered a helper class that eliminates the need to create a FileSystem object.
Paths Class
48
A complete path that does not need any information to locate a file on a system
Absolute path
49
Depends on other path information
Relative path
50
What kind of path is C:\\Java\\Chapter.11\\SampleFile.txt
Absolute path
51
How to convert a relative path to an absolute path
toAbsolutePath()
52
Returns the String representation of the path, eliminating double backslashes.
String toString()
53
Returns the file or directory denoted by this Path
path getFileName()
54
Returns the number of name elements in the Path
int getNameCount()
55
Returns the name in the position of the Path specified by the integer parameter
Path getName(int)
56
Used to verify that a file exists and that the program can access it as needed.
checkAccess()
57
Checks that the file exists. Alternative to checkAccess
No argument
58
Checks that the file exists and the program has permission to read the file
Read
59
Checks that the file exists and the program has permission to write to the file
Write
60
Checks that the file exists and the program has permission to execute the file
Execute
61
Can retrieve useful information about a file
readAttributes()
62
How are FileTime objects represented
yyyy-mm-ddThh:mm:ss
63
An abstract class that contains methods for performing input
InputStream
64
Child of InputStream that provides the capability to read from disk files
FileInputStream
65
Child of FilterInputStream handles input from a system’s standard input device
BufferedInputStream
66
An abstract class that contains methods for performing output
OutputStream
67
Child of FilterOutputStream that handles output from a system’s standard output device,
BufferedOutputStream
68
Child of OutputStream that allows writing to disk files
FIleOutputStream
69
Child of FilterOutputStream. Java’s System class contains a PrintStream object named System.out
Print Stream
70
Abstract class for reading character streams; the only methods that a subclass must implement are read(char[], int, int) and close()
Reader