Fill to a contiguous range of elements in an array: short array
import java.util.Arrays; public class Main { public static void main(String[] argv) throws Exception { int startIndex = 0; int endIndex = 4; short[] shortArr = new short[10]; short shortFillValue = 1; Arrays.fill(shortArr, startIndex, endIndex, shortFillValue); } }