- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPoint.java
More file actions
Latest commit
36 lines (36 loc) · 533 Bytes
/
Copy pathPoint.java
File metadata and controls
36 lines (36 loc) · 533 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
classPoint
{
privateintx,y;
Point()
{
x=0;
y=0;
}
Point(intx,inty)
{
this.x=x;
this.y=y;
}
publicvoidsetX(intx)
{
this.x=x;
}
publicvoidsetY(inty)
{
this.y=y;
}
publicvoidsetXY(intx,inty)
{
this.x=x;
this.y=y;
}
voiddisplay()
{
System.out.println(x+" , "+y);
}
publicstaticvoidmain(String[] args)
{
Pointobj=newPoint(5,3);
obj.display();
}
}