forked from IND-Debugs/Java-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArea.java
More file actions
34 lines (31 loc) · 697 Bytes
/
Copy pathArea.java
File metadata and controls
34 lines (31 loc) · 697 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
package Allprogram;
public class Area {
public int a,b,c;
public float ar;
public void area1(int x)
{
a = x;
ar = (float) (3.14*a*a);
System.out.println(ar);
}
public void area1(int x,int y)
{
a = x;
b = y;
System.out.println(a*b);
}
public void area1(int x,int y,int z)
{
a = x;
b = y;
c = z;
System.out.println(a*b*c);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Area sc1 = new Area();
sc1.area1(4);
sc1.area1(4,5);
sc1.area1(6,5,2);
}
}