Arrays.fill() Problem

NetPerformance

Erfahrenes Mitglied
Hallo,

Ich versuche Arrays.fill() einzusetzen.
Erhalte folgende Fehlermeldung:

Multiple Markers at this line
- syntax error on token ")" delete this token
- syntax error on token "(" delete this token

Was mache ich hier falsch ?

Gruß
Aaron


Code:
package test;

//import java.util.Arrays;

public class ArrayTest {

	int startIndex = 0;
        int endIndex = 5;
        int intFillValue = 9;
    
	int [] temp = new int[5];
	Arrays.fill(temp,startIndex,endIndex,intFillValue);
	//Arrays.fill(temp, intFillValue);
	//System.out.println(Arrays.asList(temp));
	//System.out.println(Arrays.toString(temp));
}
 
Zurück