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 s = Short.parseShort("10"); System.out.println(s); }
From source file:Test.java
public static void main(String[] args) { long debitCard = 1234_5678_9876_5432L; System.out.println("The card number is: " + debitCard); }
From source file:Main.java
public static void main(String[] args) { System.out.println("Enter a string"); Scanner input = new Scanner(System.in); String s1 = input.nextLine(); s1 = s1.trim();//from www . j a v a2 s . c om int howLong = s1.length(); for (int counter = 0; counter < howLong; counter++) { char ch = s1.charAt(counter); System.out.print(ch); } }
From source file:MainClass.java
public static void main(String args[]) { int c = 31; // initialize c System.out.printf("%#o\n", c); System.out.printf("%#x\n", c); }
From source file:Main.java
public static void main(String[] args) { byte b1 = 1;//from w ww. j av a2 s. c o m byte b2 = -2; System.out.printf("%o\n", b1); System.out.printf("%o", b2); }
From source file:MainClass.java
public static void main(String[] args) { boolean includeSign = true; System.out.println(includeSign); }
From source file:Main.java
public static void main(String[] args) { int cp1 = 0x008f, cp2 = 0x0123; System.out.println(Character.highSurrogate(cp1)); System.out.println(Character.highSurrogate(cp2)); }
From source file:Main.java
public static void main(String[] args) { Double d = new Double("1.30"); System.out.println(d.longBitsToDouble(6757689)); System.out.println(d.longBitsToDouble(0x7ff0000000000000L)); System.out.println(d.longBitsToDouble(0xfff0000000000000L)); }
From source file:Main.java
public static void main(String[] args) { A a = () -> {//from w ww. j av a 2 s .c om System.out.println("Something"); }; B b = () -> { System.out.println("Something"); }; System.out.println(a.getClass()); System.out.println(b.getClass()); }
From source file:Main.java
public static void main(String[] argv) { StringBuffer sb = new StringBuffer(20); System.out.println(sb.capacity()); }