class Sample
{
int a,b;
void setAll(int i,int j)
{
a=i;
b=j;
}
void showAll( )
{
System.out.println("a= " + a +
" b="+b);
}
}
class SampleDemo
{
public static void main(String args[ ])
{
Sample ob=new Sample( );
ob.setAll(5,6);
ob.showAll( );
}
}
Comments
Post a Comment