Different IDEs shows outputs differently in the console

Viewed 56

Is there any way to make my IntelliJ console the same format as the eclipse console?

Examples:

IntelliJ

                (\__/)
                (o^.^)
                  z(_(")(")

Eclipse:

                (\__/)
                (o^.^)
              z(_(")(")

This is the code

        System.out.println("\t\t\t\t(\\__/)");
        System.out.println("\t\t\t\t(o^.^)");
        System.out.println("\t\t\t      z(_(\")(\")");
1 Answers

IntelliJ IDEA uses 4 spaces for Tab character by default, Eclipse uses 8 spaces for the console output, hence the different results.

If you want the same formatting everywhere, consider using spaces instead of tabs for indentation as the tab size can be different depending on the environment.

To get the same output in IntelliJ IDEA change Settings (Preferences on macOS) | Editor | Code Style | Other File Types | Tab size: to 8 (it affects the console output).

Related