Skip to content

Commit 3ba07ea

Browse files
committed
Java 22 and 23 new features
1 parent 4e29d5a commit 3ba07ea

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.eazybytes.java23;
2+
3+
/// **This class contains methods for performing basic math operations**
4+
/// @author Eazybytes
5+
/// @version 1.0
6+
public class MarkDownComments {
7+
8+
9+
/// | Input | Output |
10+
/// |-------|-------|
11+
/// | 2,3 | 5 |
12+
/// | 9,2 | 11 |
13+
/// | 25,75 | 100 |
14+
/// **This method adds two numbers**
15+
/// @param a first number
16+
/// @param b second number
17+
/// @return sum of the two numbers
18+
public static int add(int a, int b) {
19+
return a + b;
20+
}
21+
22+
/// ## This method subtract two numbers
23+
/// - 5,3 = 2
24+
/// - 9,2 = 7
25+
/// @param a first number
26+
/// @param b second number
27+
/// @return ***subtraction of the two numbers***
28+
public static int subtract(int a, int b) {
29+
return a - b;
30+
}
31+
32+
/// ---
33+
/// # This method multiply two numbers
34+
/// @param a first number
35+
/// @param b second number
36+
/// @return ***multiplication of the two numbers***
37+
public static int multiply(int a, int b) {
38+
return a * b;
39+
}
40+
41+
/// # This method divide two numbers
42+
/// ```
43+
/// @Override
44+
/// public void division() ...
45+
/// ```
46+
/// @param a first number
47+
/// @param b second number
48+
/// @return ***division of the two numbers***
49+
public static int divide(int a, int b) {
50+
return a / b;
51+
}
52+
53+
}

0 commit comments

Comments
 (0)