You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically System.out.format() and System.out.printf() split lines in unexpected positions and also treat %n inconsistently. From run to run it produces different results. Therefore notice, that the Current Result provided here is just one of many possible random outcomes.
public class PrintfTest {
public static void main(String[] args) {
IntStream.range(0, 10).forEach(it ->
System.out.format("This is iteration %d. Hello VS Code! Hello RedHat!%n", it));
}
}
Current Result
This is iteration
0. Hello VS Code! Hello RedHat!
This is iteration 1. Hello VS Code! Hello RedHat!
This is iteration 2. Hello VS Code! Hello RedHat!
This is iteration 3. Hello VS Code! Hello RedHat!
This is iteration
4. Hello VS Code! Hello RedHat!
This is iteration
5
. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
7
. Hello VS Code! Hello RedHat!
This is iteration 8. Hello VS Code! Hello RedHat!
This is iteration
9. Hello VS Code! Hello RedHat!
Expected Result
Just 10 solid lines like in any observable terminal or IDE's console?
Additional Informations
none
The text was updated successfully, but these errors were encountered:
The question is already on stackoverflow: https://stackoverflow.com/questions/55588019/debug-console-in-vs-code-with-java-support-erroneously-splits-lines-in-output-fo. However this looks more like an issue with RedHat's language support for Java and therefore the question might as well belong here.
Basically System.out.format() and System.out.printf() split lines in unexpected positions and also treat %n inconsistently. From run to run it produces different results. Therefore notice, that the Current Result provided here is just one of many possible random outcomes.
Environment
Commit: 0dd516dd412d42323fc3464531b1c715d51c4c1a
Date: 2019-04-04T15:14:28.026Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Steps To Reproduce
PrintfTest.java:
import java.util.stream.IntStream;
public class PrintfTest {
public static void main(String[] args) {
IntStream.range(0, 10).forEach(it ->
System.out.format("This is iteration %d. Hello VS Code! Hello RedHat!%n", it));
}
}
Current Result
This is iteration
0. Hello VS Code! Hello RedHat!
This is iteration 1. Hello VS Code! Hello RedHat!
This is iteration 2. Hello VS Code! Hello RedHat!
This is iteration 3. Hello VS Code! Hello RedHat!
This is iteration
4. Hello VS Code! Hello RedHat!
This is iteration
5
. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
6. Hello VS Code! Hello RedHat!
This is iteration
7
. Hello VS Code! Hello RedHat!
This is iteration 8. Hello VS Code! Hello RedHat!
This is iteration
9. Hello VS Code! Hello RedHat!
Expected Result
Just 10 solid lines like in any observable terminal or IDE's console?
Additional Informations
none
The text was updated successfully, but these errors were encountered: