a guest Nov 23rd, 2017 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Implement methods with the following headers:
- public int filledArray(int from, int to)
- public List<Integer> filledList(int from, int to)`
- These methods should return populated lists with integer values in the range from the lower bound from (inclusive) until the upper bound to (exclusive).
- e.g. filledArray(0, 5); should return the following array [0,1,2,3,4]
- Special cases:
- If from == to, an empty list should be returned.
- If to < from, an IllegalArgumentException should be thrown.
RAW Paste Data