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) { short s1 = 1; short s2 = 2; System.out.println(Short.compare(s1, s2)); }
From source file:Main.java
public static void main(String[] args) { Short sObj1 = new Short("100"); System.out.println(sObj1); String str = "100"; Short sObj2 = Short.valueOf(str); System.out.println(sObj2);/*from w ww. jav a 2 s. co m*/ }
From source file:Main.java
public static void main(String[] args) { String str2 = "noon"; System.out.println(isPalindrome(str2)); }
From source file:Main.java
public static void main(String[] arg) { char[] ch = { 'a', 'b', 'c', 'd' }; System.out.println(String.valueOf(ch)); }
From source file:Main.java
public static void main(String[] argv) { int a = -1; a = a >>> 24; System.out.println("a is " + a); }
From source file:Main.java
public static void main(String[] args) { // returns 2 raised to 2, i.e. 4 System.out.println(Math.pow(2, 2)); // returns -3 raised to 2, i.e. 9 System.out.println(Math.pow(-3, 2)); }
From source file:Main.java
public static void main(String[] argv) { System.out.println(millisToString(100000000)); }
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)); System.out.print("Number of leading zeros = "); System.out.println(Long.numberOfLeadingZeros(l)); System.out.print("Number of trailing zeros = "); System.out.println(Long.numberOfTrailingZeros(l)); }
From source file:ArrayCopy.java
public static void main(String args[]) { System.out.printf("Before (original)\t%s%n", Arrays.toString(args)); String copy[] = Arrays.copyOf(args, 4); System.out.printf("Before (copy)\t\t%s%n", Arrays.toString(copy)); copy[0] = "A"; copy[1] = "B"; copy[2] = "C"; copy[3] = "D"; System.out.printf("After (original)\t%s%n", Arrays.toString(args)); System.out.printf("After (copy)\t\t%s%n", Arrays.toString(copy)); }
From source file:MainClass.java
public static void main(String[] arg) { char myCharacter = '\u0058'; System.out.println(myCharacter); }