Files and Exceptions Flashcards Preview

CS1003 > Files and Exceptions > Flashcards

Flashcards in Files and Exceptions Deck (11)
Loading flashcards...
1

What does the cd command do in the shell?

Change Directory

2

Explain this permission
-rw-r--r--

Read/write for the user, read for the group and others
Talking about files not a directory

3

Explain this permission
-rwxr-x---

Read/Write/Execute for the user, read for the group and execute for others
Talking about files not a directory

4

Explain this permission
dr-xr-xr-x

Talking about a directory
Execute/Read for the user and group and just execute for the others

5

What is an exception?

An event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions

6

What is an error?

Indicates a serious problem that a reasonable application should not try to catch

7

What is the difference between an exception and an error?

Try to catch an exception, don't try to catch an error

8

Why does Java allow unchecked exceptions?

Wanted to have unchecked exceptions that should be used when calling code cannot recover

9

What is the purpose of a finally block?

Used to execute important code such as a closing connection because always executed whether an exception is handled or not

10

Give the disadvantages of files over relational databases

- Data redundancy and inconsistency
- Difficulty in accessing data
- Integrity problems
- Security problems
- Atomicity of updates
- Concurrent access

11

Give the advantages of files over relational databases

Cheaper
Doesn't require special knowledge