My own DailyWTF
Today I was going through some Java code that was basically a straight port from VB 6 to make sure the functionality was there. During my review I came across the following:
In a private method:
int[] qtrMonths = {0,0,0,0};
for (int i=0;i<4;i++)
qtrMonths[i] = ((i+1)*3)-2;
Notice that the only variable that changes is the counter “i” ![]()
Wonder what the original VB guy was thinking on this one.
Comments(4)
