Java Array Print printArray(float[] spectrum)

Here you can find the source of printArray(float[] spectrum)

Description

print Array

License

Open Source License

Declaration

public static void printArray(float[] spectrum) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void printArray(float[] spectrum) {
        if (spectrum == null) {
            System.out.println("null");
            return;
        }//from w  w  w . j  a v a2 s . com
        System.out.print("[");
        for (int i = 0; i < (spectrum.length - 1); i++)
            System.out.print(spectrum[i] + ", ");
        if (spectrum.length > 0)
            System.out.println(spectrum[spectrum.length - 1] + "]");
    }
}

Related

  1. printArray(double[] a)
  2. printArray(double[] array, String info)
  3. printArray(double[] d)
  4. printArray(E[] a)
  5. printArray(float[] array)
  6. printArray(int A[])
  7. printArray(int arr[])
  8. printArray(int[] array)
  9. printArray(int[] array)