class
point
{
int x,y;
void init(int x,int y)
{
this.x = x;
this.y = y;
}
void display()
{
System.out.println("x =
" + x);
System.out.println("y =
" + y);
}
}
class
point1
{
public static void main(String args[])
{
point pp = new point();
pp.init(4,3);
pp.display();
}
}
No comments:
Post a Comment