There is an Arraylist which has size 14 and I have to divide it into 6 sub-arraylists.
List<Integer> list;
list = new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10,11,12,13,14));
For example like below :
14/6 = 2.333
Now when I'll take ceil value 3 then only 5 sub-arraylist will be created and when I'll take floor value i.e. 2 then 7 sub-arraylist will be created but I need 6.
How to achieve this ?