[Solved] How to get count of number elements which are greater than current element in an arraylist [closed]
[ad_1] You can do this: public void greaterCounter(List<Integer> input){ for (Integer i : input){ Integer count = 0; for (Integer j : input){ if (i < j) count++; } System.out.print(i+”,”+count+” “); } } 2 [ad_2] solved How to get count of number elements which are greater than current element in an arraylist [closed]