Which of the lines will cause a compile time error in the following program?
Code: Select all
public class MyClass
{
public static void main(String args[])
{
char c;
int i;
c = 'a';//1
i = c; //2
i++; //3
c = i; //4
c++; //5
}
}
.. Why did you mention this? The code does not compile,as you stated, because of line 4. And, 'i' is set at line 2.'i' is not initialized.
????