Back | Reverse | Quick Reply | Post Reply |

challlennngee
Link | by floopy! on 2006-11-29 16:00:40
aiiyaa comp sci is hard for me T_T
What is the output?

the data file (nums.dat)has:
34
23
11
22
27

BufferedReader file =new BufferedReader(new FileReader("nums.dat"));
String line;
while((line=file.readLine()) !=null) {
line = file.readLine();
int number = Integer.parseInt(line);
System.out.print(number + " ");
}
file.close();

Re: challlennngee
Link | by EmptyMind on 2006-11-29 22:17:34
Is it really ok if we just tell you the answer? Just go line by line and see what each one does. Pretend you're the computer and do each step exactly as written, which may or may not be how to get the desired result.

What I think will happen.


>,>; Did I just say that...?

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0024 seconds at 2024-05-05 09:28:08