-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntroduction.java
More file actions
76 lines (71 loc) · 1.38 KB
/
Copy pathIntroduction.java
File metadata and controls
76 lines (71 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//package methods;
//
//public class Introduction {
//
// public static void main(String[] args) {
//
//// int firstNumber = 34;
//// int secondNumber = 57;
////
//// int result = maxOf(firstNumber, secondNumber);
////
////
//// System.out.println(result);
////
//// sayHi();
////
//// }
////
//// static int maxOf (int a, int b) {
//// if(a > b) {
//// return a;
//// } else {
//// return b;
//// }
////
//// }
//// static void sayHi() {
////
//// System.out.println("Hi");
//// System.out.println("Good morning.");
// sayHi();
// int firstNum = 28;
// int secNum = 19;
// int res = maxOf(firstNum, secNum);
// System.out.println("The maximum number is "+ res);
//
// }
//
// static int maxOf(int a, int b) {
// if(a > b) {
// return a;
// } else {
// return b;
// }
//
// }
//
// static void sayHi() {
// System.out.println("Hii");
// System.out.println("Hope you are doing well.");
// }
//
//}
package methods;
public class Introduction{
public static void main(String agrs[]) {
int first = 23, second = 91;
sayHii();
int result = maxOf(first, second);
System.out.println("Max of the both number is "+ result);
}
static int maxOf(int a, int b) {
return a>b?a:b;
}
static float maxOf(float a, float b) {
return a>b?a:b;
}
static void sayHii() {
System.out.println("Hey, \n Hope you are doing great!");
}
}