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[] args) { int[] integer = new int[10]; System.out.println(Arrays.toString(integer)); Arrays.fill(integer, 1, 4, 5); System.out.println(Arrays.toString(integer)); }
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:Main.java
public static void main(String[] args) { int[] i1 = new int[] { 3, 12, 98 }; System.out.println(Arrays.toString(i1)); }
From source file:Main.java
public static void main(String[] args) { long[] l1 = new long[] { 3, 12, 9 }; System.out.println(Arrays.toString(l1)); }
From source file:Main.java
public static void main(String[] args) { short[] s1 = new short[] { 20, 70 }; System.out.println(Arrays.toString(s1)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { System.out.println(Arrays.toString(SecureRandom.getSeed(8))); }
From source file:Main.java
public static void main(String[] args) { Object[] ob1 = new Object[] { 10, 20 }; System.out.println(Arrays.toString(ob1)); }
From source file:Main.java
public static void main(String[] args) { int[] randomArray = randomArray(5); System.out.println(Arrays.toString(randomArray)); }
From source file:Main.java
public static void main(String[] args) { byte bArr[] = { 10, 17, 4, 7, 2 }; System.out.println(Arrays.toString(bArr)); // sorting array from index 1 to 4 Arrays.sort(bArr, 1, 4);//ww w .j av a 2 s . c om System.out.println(Arrays.toString(bArr)); }
From source file:Main.java
public static void main(String[] args) { double[] d1 = new double[] { 1.9, 2.9, 3.4 }; System.out.println(Arrays.toString(d1)); }