Here you can find the source of zeros(int n)
public static int[] zeros(int n)
//package com.java2s; //License from project: LGPL public class Main { public static int[] zeros(int n) { return arr(n, 0); }//from w w w .ja v a 2s . c o m public static int[] arr(int n, int d) { int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = d; } return a; } }