Search This Blog

15 June, 2011

Simple Java program 8

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();

}

No comments:

Post a Comment

Meetme@