FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaProgramming/Strings/CompareString.java at patch-2 · subham500071430/JavaProgramming · GitHub
subham500071430
/
JavaProgramming
Public
forked from
karterhhgg/JavaProgramming
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
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
JavaProgramming
/
Strings
/
CompareString.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (16 loc) · 512 Bytes
Breadcrumbs
JavaProgramming
/
Strings
/
CompareString.java
Copy path
File metadata and controls
18 lines (16 loc) · 512 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
package
Strings
;
public
class
CompareString
{
public
static
void
main
(
String
[]
args
) {
String
name1
=
"radha"
;
String
name2
=
"radha"
;
//use compareTo function ye function three conddition check karta hai
// 1. s1>s2 : +ve value
// 2. s1==s2: 0
// 3. s1<s2 : -ve value
if
(
name1
.
compareTo
(
name2
) ==
0
){
System
.
out
.
println
(
"Strins are equal"
);
}
else
{
System
.
out
.
println
(
"Strings are not equal"
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL