Just to better understand what I heard in the lecture (about Java Input and Output-Stream), I made myself this tiny program:
public static void main (String[] args) throws Exception {
int input;
FileOutputStream fos = new FileOutputStream("test.txt");
while ((input = System.in.read()) != 95) {
fos.write(input);
out.println(input);
}
out.println("- Finished -");
fos.close();
}
It prints a numerical representation of the character I just printed in stdout. It works mostly, but here is what I see in Eclipse:

"10" is the decimal ASCII representation of the string.
Good. I pressed the enter key to complete the iteration.
But why does this second meaning also appear?
I expect that only the first key will appear (actual character).
If the problem can be explained in some way, I would appreciate his / her answer.
@Sanket Makani Here is the corresponding contents of the text file "text.txt":
2
3
A
a
In Eclipse:
