8. Simple Java programs to know what
output will be.
class aaa
{
static final private int a=10; //Assignment is necessary at
// the point of declaration.
private int b;
public void sam()
{
System.out.println(a);
}
}
class psp
{
public static void main(String aa[])
{
aaa x;
x=new aaa();
x.aaa();
}
}
output will be.
class aaa
{
static final private int a=10; //Assignment is necessary at
// the point of declaration.
private int b;
public void sam()
{
System.out.println(a);
}
}
class psp
{
public static void main(String aa[])
{
aaa x;
x=new aaa();
x.aaa();
}
}
No comments:
Post a Comment