FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
learn-java/src/dataTypes/stringType/string_methods.java at master · muzammyl/learn-java · GitHub
muzammyl
/
learn-java
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
3
Code
Pull requests
0
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
learn-java
/
src
/
dataTypes
/
stringType
/
string_methods.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (22 loc) · 639 Bytes
Breadcrumbs
learn-java
/
src
/
dataTypes
/
stringType
/
string_methods.java
Copy path
File metadata and controls
23 lines (22 loc) · 639 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
package
src
.
dataTypes
.
stringType
;
class
string_methods
{
public
static
void
main
(
String
[]
args
) {
String
s1
=
"First string"
;
String
s2
=
"Second string"
;
String
s3
=
s1
;
System
.
out
.
println
(
"Length of s1: "
+
s1
.
length
());
System
.
out
.
println
(
"char at index 6 in s1: "
+
s1
.
charAt
(
6
));
if
(
s1
.
equals
(
s2
)) {
System
.
out
.
println
(
"s1 == s2"
);
}
else
{
System
.
out
.
println
(
"s1 != s2"
);
}
if
(
s1
.
equals
(
s3
)) {
System
.
out
.
println
(
"s1 == s3"
);
}
else
{
System
.
out
.
println
(
"s1 != s3"
);
}
}
}
Back
|
FazBrowse Home
|
New Git URL