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:Main.java
public static void main(String[] args) { for (int i = 0; i < 5; i++) { System.out.println("Random Number [" + (i + 1) + "] : " + Math.random()); }/* w w w .ja va2 s. c o m*/ }
From source file:Main.java
public static void main(String[] args) { Double d1 = new Double(+0.0); System.out.println(d1.doubleValue()); Double d2 = new Double(-0.0); System.out.println(d2.doubleValue()); System.out.println(d1.equals(d2)); System.out.println(+0.0 == -0.0); }
From source file:Main.java
public static void main(String[] args) { StringBuilder sb = new StringBuilder(); System.out.println(sb.capacity()); }
From source file:Main.java
public static void main(String[] argv) { String str = " java 2 s.com "; System.out.println(">" + str + "<"); str = str.trim();// ww w . java2 s . co m System.out.println(">" + str + "<"); }
From source file:Main.java
public static void main(String args[]) { String[][] data = new String[3][4]; System.out.println("Dimension 1: " + data.length); System.out.println("Dimension 2: " + data[0].length); }
From source file:Main.java
public static void main(String[] argv) { StringBuilder sb = new StringBuilder(20); System.out.println(sb.capacity()); }
From source file:Main.java
public static void main(String args[]) { Character c = new Character('c'); System.out.println(c); }
From source file:Main.java
public static void main(String[] args) { Boolean boolean1 = new Boolean("true"); System.out.println(boolean1.booleanValue()); }
From source file:Main.java
public static void main(String[] args) { float f1 = 12.3f, f2 = 45.6f; System.out.println(StrictMath.nextUp(f1)); System.out.println(StrictMath.nextUp(f2)); }
From source file:Main.java
public static void main(String[] args) { double d1 = 12.34, d2 = 56.78; System.out.println("closest long value to " + d1 + " = " + StrictMath.round(d1)); System.out.println("closest long value to " + d2 + " = " + StrictMath.round(d2)); }