FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Programs/MethodOverloading/TestMethod2.java at master · githubanalyzeruser/Java-Programs · GitHub
githubanalyzeruser
/
Java-Programs
Public
forked from
divScorp/Java-Programs
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Programs
/
MethodOverloading
/
TestMethod2.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (26 loc) · 814 Bytes
Breadcrumbs
Java-Programs
/
MethodOverloading
/
TestMethod2.java
Copy path
File metadata and controls
32 lines (26 loc) · 814 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
MethodOverloading
;
public
class
TestMethod2
{
static
void
add
(
int
a
,
double
d
){
System
.
out
.
println
(
"Argument type (int , double)"
);
}
static
void
add
(
double
d
,
int
a
){
System
.
out
.
println
(
"Argument type (double, int)"
);
}
static
void
add
(
double
d
,
double
a
){
System
.
out
.
println
(
"Argument type (double, double)"
);
}
static
void
add
(
int
a
,
float
f
){
System
.
out
.
println
(
"Argument type (int , float)"
);
}
static
void
add
(
float
f
,
int
a
){
System
.
out
.
println
(
"Argument type (float, int)"
);
}
public
static
void
main
(
String
...
args
){
//add(10,20); is a ambiguous CTE;
// because he can't able to decide which argument he will take as double or int
// as there exists two methods with args (int, double) and (double, int)
//add(12,13);
add
(
10
,
20.0
);
add
(
10.0f
,
10
);
}
}
Back
|
FazBrowse Home
|
New Git URL