class
Sample
{
int a,b;
void SetAll(int i,int j)
{
a=i;
b=j;
}
void ShowAll()
{
System.out.println("a="+a);
System.out.println("b="+b);
}
}
class
DemoSample
{
Sample ob=new Sample();
ob.SetAll(2,3);
ob.ShowAll();
}
No comments:
Post a Comment