FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SampleCodes/Java-Programs/If Statement/Question4.java at main · ajacreations/SampleCodes · GitHub
ajacreations
/
SampleCodes
Public
Notifications
You must be signed in to change notification settings
Fork
27
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
SampleCodes
/
Java-Programs
/
If Statement
/
Question4.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (24 loc) · 545 Bytes
Breadcrumbs
SampleCodes
/
Java-Programs
/
If Statement
/
Question4.java
Copy path
File metadata and controls
27 lines (24 loc) · 545 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
/*
Initialize two character variables in a program and displaythe characters in alphabetical
order.
Example1) if the first character is 's' and second character is 'e' then the output should
be e,s
Example2) if the first character is 'a' and second character is 'e', then the output should
be a,e
*/
public
class
Question4
{
public
static
void
main
(
String
args
[])
{
char
ch1
=
'b'
;
char
ch2
=
'k'
;
if
(
ch1
>
ch2
)
{
System
.
out
.
println
(
ch2
+
","
+
ch1
);
}
else
{
System
.
out
.
println
(
ch1
+
","
+
ch2
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL