PRO192_-_SP_2025_-_Block_5_-_1_3854.webp
M

PRO192_-_SP_2025_-_Block_5_-_1_3854.webp

Kizspy | Question: 50
(Choose 1 answer)
What is the output of the following code snippet?
File f new File("test.txt");
try{
}
FileReader fr = new FileReader(f);
BufferedReader bf = new BufferedReader(fr);
int k = 2;
String line="
for (int i = 0; i <k; i++) {
line = bf.readLine();
System.out.println(line);
catch (IOException e){
System.out.println(e);
Assumes that test.txt has the content as follows:
Hello
Xin chao
Hallo
Anyong Haseyo
A. Xin chao
B. Hello
C. Hallo
D. Anyong Haseyo

Thông tin

Category
PRO192
Thêm bởi
Mahito2001
Ngày thêm
Lượt xem
2,518
Lượt bình luận
5
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom