Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Implement methods with the following headers:
  2.  
  3. public int[] filledArray(int from, int to)
  4. and
  5.  
  6. public List<Integer> filledList(int from, int to)`
  7. These methods should return populated lists with integer values in the range from the lower bound from (inclusive) until the upper bound to (exclusive).
  8.  
  9. e.g. filledArray(0, 5); should return the following array [0,1,2,3,4]
  10.  
  11. Special cases:
  12.  
  13. If from == to, an empty list should be returned.
  14.  
  15. If to < from, an IllegalArgumentException should be thrown.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement