Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

java - System.out.print() doesn't send any output to Eclipse console. Why?

I have next java class:

public class Test {

    public static void main(String args[]) {

        for (int i = 0; i < 1448; i++) {
            System.out.print(i);
        }

    }
}

When I run tis code in Eclipse IDE - I don't see any output in Eclipse console.

But if I change value 1448 and set for example 1447 or less I see output in console (12345678...)

So, maybe Eclipse IDE has restrictions on string length in console?

What do you think about this?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Right click on in console -> Preferences... -> check Fixed width console. Now you have auto word wrap and everything shows ok. Seems like Eclipse console have a limit on number of characters displayed in one line.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...