Dates back to Fortran, a language that was designed primarily to work on real numbers, for scientific calculation. They needed whole numbers or "integers" -- but they didn't have the concept of type declarations yet (or it was a hodgepodge and non-standard) -- so they came up with a convention that variables whose names began with i through (some upper bound I don't remember) were integers.<p>Since loop indices are integers it made sense that their names should begin with I. If your outer loop's variable is named I and you all of a sudden need an inner loop, what are you going to name it? J of course. Which is how this convention began.<p>Obviously today's programming languages not only allow you to declare the types of variables, many of them support variable types depending on what's been stored in a variable. But this was at the dawn of the computer era, before such coolness had come about.