Chap 2 Flashcards
1
Q
what does the append mean in
FileWriter(String fileName, boolean append)
A
the boolean value represents whether data should be appended to the end the file or not.
If false, the file will be overwritten
2
Q
Difference between FIleWriter and PrintWriter?
A
FileWriter is used for writing character data to a file, while PrintWriter provides more convenient methods for writing different types of data to a file.
3
Q
What is a literal?
A
A literal is a value that is written into the code of a program.
4
Q
What is the value of z after the following statements have been executed?
int x = 4, y= 33;
double z;
z = (double) (y / x);
A
8.0