Hai All,
Have a look at the following code.
public class TestClass
{
int i1 ;
static int i2;
public void method1( )
{
int i ; //Line 1
this.i2=i1;
}
public static void main(
String args[]){
System.out.println("java");
}
}
i is a local variable in line 1. We need to initialize the local variable at the point if declaration.But in line1 i is not initialized.Moreover i'm not getting any compile time error.
I don't know why.can anyone clear my doubt.
Thanks
sudha