FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Advanced/algorithms/ReverseInteger5.java at master · janbodnar/Java-Advanced · GitHub
janbodnar
/
Java-Advanced
Public
Notifications
You must be signed in to change notification settings
Fork
26
Star
59
Code
Issues
0
Pull requests
6
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Advanced
/
algorithms
/
ReverseInteger5.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (18 loc) · 503 Bytes
Breadcrumbs
Java-Advanced
/
algorithms
/
ReverseInteger5.java
Copy path
File metadata and controls
28 lines (18 loc) · 503 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
package
com
.
zetcode
;
public
class
ReverseInteger5
{
public
static
void
main
(
String
[]
args
) {
int
value
=
73203000
;
int
value2
=
reverse
(
value
);
System
.
out
.
println
(
value2
);
}
private
static
int
reverse
(
int
number
) {
int
reverse
=
0
;
int
remainder
;
do
{
remainder
=
number
%
10
;
reverse
=
reverse
*
10
+
remainder
;
number
=
number
/
10
;
}
while
(
number
>
0
);
return
reverse
;
}
}
Back
|
FazBrowse Home
|
New Git URL