class Faltu
{
public static void main(String aa[])
{
int a=4,b;
if (a==4)
b=5;
System.out.println ("b="+b);
}
}
Here it says : "variable b might not have been initialized", but in the following :
class Faltu
{
public static void main(String aa[])
{
int a=4,b;
if (true)
b=5;
System.out.println ("b="+b);
}
}
Here it compiles perfectly. Why ?