FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
code-debugging/Java/q8.java at master · rajjitlai/code-debugging · GitHub
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
rajjitlai
/
code-debugging
Public archive
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
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
code-debugging
/
Java
/
q8.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (19 loc) · 659 Bytes
Breadcrumbs
code-debugging
/
Java
/
q8.java
Copy path
File metadata and controls
19 lines (19 loc) · 659 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
public
class
q8
{
public
static
void
main
(
String
[]
args
) {
int
[]
arr
= {
5
,
3
,
8
,
4
,
2
};
int
n
=
arr
.
length
;
for
(
int
i
=
0
;
i
<
n
;
i
++) {
for
(
int
j
=
0
;
j
<
n
;
j
++) {
if
(
arr
[
j
] >
arr
[
j
+
1
])
{
int
temp
=
arr
[
j
];
arr
[
j
] =
arr
[
j
+
1
];
arr
[
j
+
1
] =
temp
;
}
}
}
for
(
int
num
:
arr
) {
System
.
out
.
print
(
num
+
" "
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL