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.println(validateFirstName("Tom"));
    System.out.println(validateLastName("Tom"));
}

From source file:Main.java

public static void main(java.lang.String[] args) {
    System.out.println("in " + new CurrentClassGetter().getClassName() + " class");
}

From source file:Main.java

public static void main(String[] args) {
    System.out.println("#1:" + Thread.interrupted());

    // Now interrupt the main thread
    Thread.currentThread().interrupt();

    // Check if it has been interrupted
    System.out.println("#2:" + Thread.interrupted());

    // Check again if it has been interrupted
    System.out.println("#3:" + Thread.interrupted());
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    System.out.printf("group separators: %,.2f\n\n", 1546456.87);

}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    System.out.printf("Two decimal digits: %.2f\n", 10.0 / 3.0);
}

From source file:PrintfExamples.java

public static void main(String[] args) {
    System.out.printf("1.0 5f num is %5f\n", 1.0);
    System.out.printf("1.0 4f num is %4f\n", 1.0);

}

From source file:Main.java

public static void main(String args[]) {

    System.out.println("Min byte value   = " + Byte.MIN_VALUE);
    System.out.println("Max byte value   = " + Byte.MAX_VALUE);
    System.out.println("Min short value  = " + Short.MIN_VALUE);
    System.out.println("Max short value  = " + Short.MAX_VALUE);
    System.out.println("Min int value    = " + Integer.MIN_VALUE);
    System.out.println("Max int value    = " + Integer.MAX_VALUE);
    System.out.println("Min float value  = " + Float.MIN_VALUE);
    System.out.println("Max float value  = " + Float.MAX_VALUE);
    System.out.println("Min double value = " + Double.MIN_VALUE);
    System.out.println("Max double value = " + Double.MAX_VALUE);
}

From source file:MainClass.java

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

    System.out.printf("Default floating-point format: %f\n", 1234567.123);
    System.out.printf("Floating-point with commas: %,f\n", 1234567.123);
    System.out.printf("Negative floating-point default: %,f\n", -1234567.123);
    System.out.printf("Negative floating-point option: %,(f\n", -1234567.123);

    System.out.printf("Line-up positive and negative values:\n");
    System.out.printf("% ,.2f\n% ,.2f\n", 1234567.123, -1234567.123);
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    System.out.printf("Use group separators: %,.2f\n\n", 123456.87);
}

From source file:Main.java

public static void main(String[] args) throws Exception {
    System.out.println(System.getenv());

}