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[] argv) { int i = 1;//from www .j av a 2 s. c o m if (i > 0) { System.out.println("Here"); i -= 1; } else System.out.println("There"); }
From source file:Main.java
public static void main(String[] argv) { String str = "java2s.com"; System.out.println(str.substring(1, 3)); }
From source file:Main.java
public static void main(String[] args) { System.out.println(BigDecimal.ONE); }
From source file:Main.java
public static void main(String[] args) { System.out.println(BigDecimal.ZERO); }
From source file:Main.java
public static void main(String[] args) { String s = "java2s.com"; System.out.println(s.toString()); }
From source file:Main.java
public static void main(String[] args) { long l = 100; System.out.println("Number = " + l); System.out.println("Binary = " + Long.toBinaryString(l)); System.out.println("Lowest one bit = " + Long.lowestOneBit(l)); }
From source file:Main.java
public static void main(String[] args) { long l = 100; System.out.println("Number = " + l); System.out.println("Binary = " + Long.toBinaryString(l)); System.out.println("Lowest one bit = " + Long.highestOneBit(l)); }
From source file:MainClass.java
public static void main(String[] arg) { String s = null; System.out.println(s); }
From source file:Main.java
public static void main(String[] args) { System.out.printf("%.2e %n", 123456.789); System.out.printf("%.2f %n", 123456.789); System.out.printf("%.2g %n", 123456.789); System.out.printf("'%8.2e' %n", 123456.789); System.out.printf("'%8.2f' %n", 123456.789); System.out.printf("'%8.2g' %n", 123456.789); System.out.printf("'%10.2e' %n", 123456.789); System.out.printf("'%10.2f' %n", 123456.789); System.out.printf("'%10.2g' %n", 123456.789); System.out.printf("'%-10.2e' %n", 123456.789); System.out.printf("'%-10.2f' %n", 123456.789); System.out.printf("'%-10.2g' %n", 123456.789); System.out.printf("'%010.2e' %n", 123456.789); System.out.printf("'%010.2f' %n", 123456.789); System.out.printf("'%010.2g' %n", 123456.789); }
From source file:Main.java
public static void main(String args[]) { int num = 19648; System.out.println(num + " in binary: " + Integer.toBinaryString(num)); System.out.println(num + " in octal: " + Integer.toOctalString(num)); System.out.println(num + " in hexadecimal: " + Integer.toHexString(num)); }