- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointProgram.java
More file actions
Latest commit
44 lines (35 loc) · 764 Bytes
/
Copy pathPointProgram.java
File metadata and controls
44 lines (35 loc) · 764 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
37
38
39
40
41
42
43
44
importjava.util.*;
classPointProgram
{
intx;
inty;
publicvoiddisplay()
{
System.out.println("x=" + x);
System.out.println("y=" + y);
}
publicPointProgram()
{
x = 0;
y = 0;
}
publicPointProgram(intn)
{
x = n;
y = n;
}
publicPointProgram(intn, intn2)
{
x = n;
y = n2;
}
publicstaticvoidmain(String[] arrstring)
{
PointProgramp0 = newPointProgram();
p0.display();
PointProgramp = newPointProgram(65,98);
p.display();
PointProgramp1 = newPointProgram(43);
p1.display();
}
}