declaring different type variables inside for condition in Java

Viewed 1283

I know this is stupid, but it is sort of hard to research properly due to it's simple nature, I suppose.

for (char letter = 'a', int num = 1; maxLine - num > 0; letter++, num++) {
    System.out.print(letter);
}

This is a standard way to define variables inside a for condition for C and C#, but it doesn't seem to work here. Why?

2 Answers
Related