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 { SecureRandom sr = SecureRandom.getInstance("SHA1PRNG"); System.out.println(Arrays.toString(sr.generateSeed(8))); }
From source file:Main.java
public static void main(String[] args) { // initializing char array char arr[] = new char[] { 'a', 'b', 'c', 'd', 'e', 'f' }; System.out.println(Arrays.toString(arr)); // using fill for placing z from index 2 to 4 Arrays.fill(arr, 2, 4, 'z'); System.out.println(Arrays.toString(arr)); }
From source file:Main.java
public static void main(String[] args) { Color myColor = Color.RED; System.out.println(/* w ww. ja v a 2 s . co m*/ Arrays.toString(myColor.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ), null))); }
From source file:Main.java
public static void main(String[] args) { Color myColor = Color.RED; System.out.println(/* w ww . ja v a 2 s . co m*/ Arrays.toString(myColor.getComponents(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ), null))); }
From source file:Main.java
public static void main(String[] args) throws Exception { int[] ints = new Random().ints(1, 50).distinct().limit(6).toArray(); System.out.println(Arrays.toString(ints)); }
From source file:Main.java
public static void main(String[] args) { Integer[] numbers = { 1, 2, 3 }; // reverse with lambda reverseWithLambda(numbers);// w w w . ja v a 2 s . co m System.out.println(Arrays.toString(numbers)); }
From source file:Main.java
public static void main(String[] args) { // initializing Object array Object arr[] = new Object[] { 1.5, 5.6, 4.5, 2.3, 6.7 }; System.out.println(Arrays.toString(arr)); // using fill for placing 12.2 Arrays.fill(arr, 12.2);/* w w w . j a v a 2 s. c o m*/ System.out.println(Arrays.toString(arr)); }
From source file:Main.java
public static void main(String[] args) { // initializing double array double arr[] = new double[] { 1.2, 5.6, 3.4, 2.3, 6.7 }; System.out.println(Arrays.toString(arr)); // using fill for placing 1.2 Arrays.fill(arr, 1.2);/*w w w.j a va 2s. c om*/ System.out.println(Arrays.toString(arr)); }
From source file:Main.java
public static void main(String[] args) { // initializing object array Object arr[] = new Object[] { 1.2, 5.6, 3.4, 2.3, 6.7 }; System.out.println(Arrays.toString(arr)); // using fill for placing 12.2 from index 1 to 3 Arrays.fill(arr, 1, 3, 12.2); System.out.println(Arrays.toString(arr)); }
From source file:Main.java
public static void main(String[] argv) throws Exception { int[] array = { 1, 2, 3 }; System.arraycopy(array, 0, array, 1, array.length - 1); System.out.println(Arrays.toString(array)); }