- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuncOverload.java
More file actions
Latest commit
41 lines (36 loc) · 681 Bytes
/
Copy pathfuncOverload.java
File metadata and controls
41 lines (36 loc) · 681 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
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author g1.test1
*/classoverl
{ intr,h,l;
overl()
{
r=0;
h=0;
l=0;
}
publicstaticvoidarea(intx)
{System.out.println("area="+(3.14*x*x));
}
publicstaticvoidarea(intx,inty )
{
System.out.println("volume"+(3.14*x*x*y));
}
publicstaticintarea(intx,inty,intz)
{ inth=x*y*z;
returnh;
}
}
publicclassfuncOverload {
publicstaticvoidmain(Stringargs[])
{ overlobj=newoverl();
obj.area(2,3);
obj.area(2);
intc=obj.area(2,3,4);
System.out.println(c);
}
}