FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Ultimate-Java-Resources/JavaMethods.java at master · CodeForHunger/Ultimate-Java-Resources · GitHub
CodeForHunger
/
Ultimate-Java-Resources
Public
forked from
sPredictorX1708/Ultimate-Java-Resources
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
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
Ultimate-Java-Resources
/
JavaMethods.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (27 loc) · 603 Bytes
Breadcrumbs
Ultimate-Java-Resources
/
JavaMethods.java
Copy path
File metadata and controls
34 lines (27 loc) · 603 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
33
34
import
java
.
io
.*;
class
Addition
{
// adding two integer value.
public
int
add
(
int
a
,
int
b
)
{
int
sum
=
a
+
b
;
return
sum
;
}
}
class
GFG
{
private
static
int
addTwo
(
int
a
,
int
b
){
int
sum
=
a
+
b
;
return
sum
;
}
public
static
void
main
(
String
[]
args
)
{
Addition
ob
=
new
Addition
();
int
sum1
=
ob
.
add
(
1
,
2
);
System
.
out
.
println
(
"sum of the two integer value :"
+
sum1
);
int
sum2
=
ob
.
add
(
1
,
2
);
System
.
out
.
println
(
"sum of the three integer value :"
+
sum2
);
int
sum3
=
addTwo
(
1
,
2
);
System
.
out
.
println
(
sum3
);
}
}
Back
|
FazBrowse Home
|
New Git URL