Extra Stuff Flashcards

(5 cards)

1
Q

What should you import for dealing with files?

A

import java.io.*

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

What is the code to print out errors?

A

e.printStackTrace();

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

How do you define a new file?

A

File name = new File(“”)

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

What is the basic format of reading a file?

A

try { }
catch () { }

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