List of usage examples for java.lang System out
PrintStream out
To view the source code for java.lang System out.
Click Source Link
From source file:LatinSet.java
public static void main(String[] args) { System.out.println("ISO LATIN-1 CHARACTER SET"); for (int x = 160; x < 255; x++) { System.out.print((char) x); System.out.print(" "); if (x % 8 == 7) System.out.print("\n"); }/* w w w. j ava2 s. c o m*/ }
From source file:MainClass.java
public static void main(String args[]) { System.out.printf("%e\n", 12345678.9); System.out.printf("%e\n", +12345678.9); System.out.printf("%e\n", -12345678.9); System.out.printf("%E\n", 12345678.9); System.out.printf("%f\n", 12345678.9); System.out.printf("%g\n", 12345678.9); System.out.printf("%G\n", 12345678.9); }
From source file:Main.java
public static void main(String[] args) { System.out.println(Math.round(10f)); System.out.println(Math.round(2.5f)); System.out.println(Math.round(-1.4f)); System.out.println(Math.round(-2.5f)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { System.out.printf("%10s %10s %10s\n", "this", "is", "a test"); }
From source file:Main.java
public static void main(String[] args) { System.out.println("Is Native method ? :"); Thread t = Thread.currentThread(); StackTraceElement e = t.getStackTrace()[0]; System.out.println(e.isNativeMethod()); }
From source file:Main.java
public static void main(String[] args) throws Exception { System.out.print(Integer.toHexString(0x10000 | i).substring(1).toUpperCase()); }
From source file:PrintfExamples.java
public static void main(String[] args) { System.out.printf("num is %03d\n", 5); }
From source file:Main.java
public static void main(String[] args) { System.out.println(Math.floor(70)); System.out.println(Math.floor(31.1)); System.out.println(Math.floor(12.5)); System.out.println(Math.floor(-10)); System.out.println(Math.floor(-12.4)); System.out.println(Math.floor(0)); }
From source file:MainClass.java
public static void main(String[] args) { System.out.println(validateCity("Street")); System.out.println(validateState("CA")); }
From source file:Main.java
public static void main(String[] args) { System.out.println(Math.ceil(10)); System.out.println(Math.ceil(9.1)); System.out.println(Math.ceil(5.5)); System.out.println(Math.ceil(-10)); System.out.println(Math.ceil(-4.4)); System.out.println(Math.ceil(0)); }