List of usage examples for java.util Arrays toString
public static String toString(Object[] a)
From source file:Main.java
public static void main(String[] argv) throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(10); int capacity = bbuf.capacity(); // 10 System.out.println(capacity); bbuf.putInt(2, 123);/*from ww w . j a va 2s . c om*/ System.out.println(Arrays.toString(bbuf.array())); }
From source file:Main.java
public static void main(String[] argv) throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(10); int capacity = bbuf.capacity(); // 10 System.out.println(capacity); bbuf.putDouble(123);// w w w. j av a2 s. c o m System.out.println(Arrays.toString(bbuf.array())); }
From source file:Main.java
public static void main(String[] args) { insertInOrder(6);/* www.j a va 2 s .co m*/ insertInOrder(17); insertInOrder(28); insertInOrder(-1); insertInOrder(19); insertInOrder(7); insertInOrder(12); System.out.println(Arrays.toString(array)); }
From source file:Main.java
public static void main(String[] argv) { IntFunction<int[]> arrayCreator1 = size -> new int[size]; // Creates an int array of five elements int[] intArray1 = arrayCreator1.apply(5); System.out.println(Arrays.toString(intArray1)); IntFunction<int[]> arrayCreator2 = int[]::new; int[] intArray2 = arrayCreator2.apply(5); System.out.println(Arrays.toString(intArray2)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(10); int capacity = bbuf.capacity(); // 10 System.out.println(capacity); bbuf.putChar(5, 'a'); System.out.println(Arrays.toString(bbuf.array())); }
From source file:Main.java
public static void main(String[] argv) throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(10); int capacity = bbuf.capacity(); // 10 System.out.println(capacity); bbuf.putLong(2, 123);/*from w w w .ja v a2 s . c o m*/ System.out.println(Arrays.toString(bbuf.array())); }
From source file:Main.java
public static void main(String[] args) { List numbers = new ArrayList(); for (int i = 0; i < 25; i++) { numbers.add(i);//from w w w. j av a2 s . com } System.out.println(Arrays.toString(numbers.toArray())); Collections.rotate(numbers, 10); System.out.println(Arrays.toString(numbers.toArray())); }
From source file:Main.java
public static void main(String[] argv) throws Exception { ByteBuffer bbuf = ByteBuffer.allocate(10); int capacity = bbuf.capacity(); // 10 System.out.println(capacity); bbuf.put(0, (byte) 2); System.out.println(Arrays.toString(bbuf.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer bb = ShortBuffer.allocate(10); bb.put((short) 100); bb.rewind();// w w w .j av a2 s . c om short[] shortArray = new short[10]; bb.get(shortArray); System.out.println(Arrays.toString(shortArray)); }
From source file:Main.java
public static void main(String[] args) { IntBuffer bb = IntBuffer.allocate(10); bb.put(100);//w w w. j a va 2 s. c om bb.rewind(); IntBuffer intBuffer2 = IntBuffer.allocate(10); intBuffer2.put(bb); System.out.println(Arrays.toString(intBuffer2.array())); }