As a side note, I really dislike reading code that uses integers for result sets, such as rs.getString(1). Name your projection variables, even if they are aggregate functions! Using rs.getInt("COUNT") is so much more illustrative.
There are so many reasons integer indexes can be bad, I'll let you guys fill in the blanks...
The one reason I can explain is If we use integer numbers to access columns , in that case if the table is altered later on (any column is deleted or appended) , then at every place in code there is need to modify numbered projections.
however if we use named projection variable , there is no impact on existing code. Only need to alter relevant code for(deleted/new column).