How fast initial value to an array

Category: Java SE
 
yunlongxuan
2012-01-24 11:09:38

Sponsored Links
For instance to an array int a [] = new int [10] initial value, so that a [i] are 0
addition to circulating the assignment, there is no fast way? ? ?

Sponsored Links

A789963
2012-01-24 11:21:29
int a [] = new int [10]
default is 0 bar, do not need poetry.
Nisj
2012-01-24 11:31:04
class variable in a statement it was already given a default initial value! !
kainanbin
2012-01-24 11:49:27
If the method defined in the local variable
can: int a [] = {0,0,0,0,0};
lbf1015
2012-01-24 12:07:08
if it is to make a [i] are 0

then no
lyalexnb
2012-01-24 12:21:36
a [i] new when it is already 0, right!

ylyl123
2012-01-24 12:26:09
System.arraycopy ();
qin0564
2012-01-24 12:29:43
int [] a = {1, 2, 3, 4, 5, 6, ; 7, 8, 9, 10};
asuntir123
2012-01-24 12:45:04
import java.util. *;
.......
int [] ; temp = new temp [n];
Arrays.fill (temp, 0);
.......
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.