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:MainClass.java
public static void main(String args[]) { int n = 170; // 10101010 System.out.println("Value in binary: 10101010"); System.out.println("Number of one bits: " + Integer.bitCount(n)); }
From source file:Main.java
public static void main(String[] args) { Float float1 = new Float(0.0d); System.out.println(float1); }
From source file:MainClass.java
public static void main(String[] arg) { double sunDistance = 1.496E8; System.out.println(sunDistance); }
From source file:Main.java
public static void main(String[] args) { Long lObj1 = new Long("100"); System.out.println(lObj1); String str = "100"; Long lObj2 = Long.valueOf(str); System.out.println(lObj2);/*from www . jav a 2 s . c o m*/ }
From source file:IsEnum.java
public static void main(String[] args) { System.out.println(Size.class.isEnum()); System.out.println(String.class.isEnum()); System.out.println(String.class.isInstance("Test")); System.out.println(XMLReader.class.isInterface()); }
From source file:Main.java
public static void main(String[] args) { double d1 = 12, d2 = 0.0; System.out.println("value in radian of " + d1 + " = " + StrictMath.toRadians(d1)); System.out.println("value in radian of " + d2 + " = " + StrictMath.toRadians(d2)); }
From source file:Main.java
public static void main(String[] args) { String str = "1234567890987654"; System.out.println("Value = " + Long.valueOf(str)); }
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) + "] : " + (int) (Math.random() * 100)); }/*from w ww . j av a2 s . co m*/ }
From source file:Main.java
public static void main(String[] args) { byte b1 = 1; byte b2 = 2; System.out.println(Byte.compare(b1, b2)); }
From source file:Main.java
public static void main(String[] args) { float f1 = 25, f2 = 1024; System.out.println("Exponent value of " + f1 + " = " + StrictMath.getExponent(f1)); System.out.println("Exponent value of " + f2 + " = " + StrictMath.getExponent(f2)); }