Here you can find the source of sumRightShifts(int num, int... shifts)
public static int sumRightShifts(int num, int... shifts)
//package com.java2s; //License from project: Apache License public class Main { public static int sumRightShifts(int num, int... shifts) { if (shifts == null) { return num; }//from w ww .j a v a 2s.co m int sum = 0; for (int shift : shifts) { sum += num >>> shift; } return sum; } }