public class Exercise1b { // assigns val to each element of a starting at position from (inclusive) // and ending at position to (exclusive) // returns the number of positions at which the value was written public static int fill(int[] a, int from, int to, int val) { for (int i=from; i= 0) return result; return 0; } }