SyntaxFix
Write A Post
Hire A Developer
Questions
This is the shortest I could get using Core Java.
List<Integer> makeSequence(int begin, int end) { List<Integer> ret = new ArrayList(end - begin + 1); for(int i = begin; i <= end; i++, ret.add(i)); return ret; }