L
Lara
In netbeans 5.0, carriage return results e.g:
System.ou.print("Welcome \rto java");
Welcome
to java
Why???
System.ou.print("Welcome \rto java");
Welcome
to java
Why???
Lara said:In netbeans 5.0, carriage return results e.g:
System.ou.print("Welcome \rto java");
Welcome
to java
Why???
Looks ok to me. What were you expecting?
Lara said:Mark Space ÃÑÓáÊ:
\r means carriage return not new line
so, the result must be
to java
the cursor will return to the start of current line
another e.g:
System.out.print("Welcome \rjava");
the output:
javaome
but in netbeans 5.0 the output is:
Welcome
java
????
like \n?
????
Lara said:System.out.print("Welcome \rjava");
the output:
javaome
but in netbeans 5.0 the output is:
Welcome
java
Andreas Leitgeb said:The problem is not, what gets written out to System.out,
but rather how much effort netbeans does to emulate a
real terminal. Obviously this effort does not go far
enough to distinguish between \r and \n.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.