Example usage for java.lang System out

List of usage examples for java.lang System out

Introduction

In this page you can find the example usage for java.lang System out.

Prototype

PrintStream out

To view the source code for java.lang System out.

Click Source Link

Document

The "standard" output stream.

Usage

From source file:MainClass.java

public static void main(String[] args) {
    System.out.printf("Scientific notation:   %e\n", Math.PI);
}

From source file:GetVersion.java

public static void main(String[] args) {
    System.out.println(System.getProperty("java.specification.version"));
    System.out.println("System.getenv(\"PATH\") = " + System.getenv("PATH"));
}

From source file:Main.java

public static void main(String args[]) {
    System.out.printf("Hi %s at %s", "value", "value 2");

    String a[] = { "value 1", "value 2" };

    System.out.println(String.format("hi %s at %s", a));
}

From source file:MainClass.java

public static void main(String args[]) {
    System.out.printf("Negative floating-point option: %,(f\n", -1234567.123);

}

From source file:Main.java

public static void main(String[] args) {
    System.out.printf("%.2e %n", Double.NaN);
    System.out.printf("%.2f %n", Double.POSITIVE_INFINITY);
    System.out.printf("%.2g %n", Double.NEGATIVE_INFINITY);
    System.out.printf("%(f %n", Double.POSITIVE_INFINITY);
    System.out.printf("%(f %n", Double.NEGATIVE_INFINITY);
}

From source file:MainClass.java

public static void main(String[] args) {
    System.out.printf("Decimal/Scientific:    %G\n", Math.PI);
}

From source file:MainClass.java

public static void main(String[] args) {
    System.out.printf("Uppercase Hexadecimal: %A\n", Math.PI);
}

From source file:Main.java

public static void main(String[] args) {
    System.out.println("isValid = " + isValidEmailAddress("user@domain.com"));
}

From source file:Main.java

public static void main(String[] args) {
    System.out.printf("%c %n", 'a');
    System.out.printf("%C %n", 'a');
    System.out.printf("%C %n", 98);
    System.out.printf("'%5C' %n", 102);
    System.out.printf("'%-5C' %n", 102);
}

From source file:MainClass.java

public static void main(String args[]) {
    System.out.printf("%d %(d %+d %05d\n", 3, -3, 3, 3);

}