-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMethodOverload.java
More file actions
59 lines (52 loc) · 1.38 KB
/
Copy pathMethodOverload.java
File metadata and controls
59 lines (52 loc) · 1.38 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package basic;
public class MethodOverload {
void mehodOverloadPractice(int a, double d) {
System.out.println("INT and Double");
}
void mehodOverloadPractice(int a, float d) {
System.out.println("INT and FLOAT");
}
void mehodOverloadPractice(long a, int d) {
System.out.println("LONG and INT");
}
void mehodOverloadPractice(int a, long d) {
System.out.println("INT and LONG");
}
void mehodOverloadPractice(int a, int d) {
System.out.println("INT and INT");
}
void mehodOverloadPractice(long a, long d) {
System.out.println("LONG and LONG");
}
void mehodOverloadPractice(short a, double d) {
System.out.println("SHORT and Double");
}
void mehodOverloadPractice(double d, int i) {
System.out.println("DOUBLE and INT");
}
void mehodOverloadPractice( int i) {
System.out.println("INT");
}
void mehodOverloadPractice( long i) {
System.out.println("LONG");
}
void mehodOverloadPractice( double i) {
System.out.println("DOUBLE");
}
void mehodOverloadPractice( float i) {
System.out.println("FLOAT");
}
void mehodOverloadPractice(short i) {
System.out.println("SHORT");
}
void mehodOverloadPractice(byte i) {
System.out.println("BYTE");
}
public static void main(String[] args) {
// TODO Auto-generated method stub
MethodOverload methodOverload = new MethodOverload();
byte b = 50;
short s = 50;
methodOverload.mehodOverloadPractice(s);
}
}