WorksheetsComprog-October 11, 2022
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
a)
import
b)
java.
c)
io.
d)
FileNotFoundException
e)
;
1)
2)
3)
4)
5)
2.
a)
import
b)
java.
c)
io.
d)
FileReader
e)
;
1)
2)
3)
4)
5)
3.
a)
import
b)
java.
c)
util.
d)
Scanner
e)
;
1)
2)
3)
4)
5)
4.
a)
while
b)
(
c)
inFile.
d)
hasNext()
e)
)
1)
2)
3)
4)
5)
5.
a)
outFile.
b)
printf
c)
("Number of items: %d",
d)
numQuantity)
e)
;
1)
2)
3)
4)
5)
6.
a)
inFile
b)
.
c)
close
d)
()
e)
;
1)
2)
3)
4)
5)
7.
a)
quantity
b)
=
c)
inFile.
d)
nextInt()
e)
;
1)
2)
3)
4)
5)
8.
a)
Scanner
b)
inFile
c)
= new Scanner
d)
(new FileReader
e)
("D://Grocery.txt"));
1)
2)
3)
4)
5)
9.
a)
PrintWriter
b)
outFile
c)
=
d)
new PrintWriter
e)
("D://NewGrocery.txt");
1)
2)
3)
4)
5)
10.
a)
public static
b)
void main
c)
(String[] args)
d)
throws
e)
FileNotFoundException
1)
2)
3)
4)
5)
100 %
