Java arrays.fill issue -
import java.util.arrays; public class mainclass { int[] integer=new int[10]; arrays.fill(integer,1,4,5); }
can explain me why line arrays.fill(integer,1,4,5)
wrong. understand arrays.fill
works (name of array,from point, point, value)
because line not in method.
when supposed executed?
if want executed @ object construction time, palce in constructor.
Comments
Post a Comment