TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Java - String Manipulation Concept
Senthilvelan Sambamoorthy
Aug 20
2016
Code
709
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
str1.rar
class
str1
{
public
static
void
main(String arg[])
{
String s1 =
"Hello World"
;
String s2 =
"hello"
;
String s3 =
"world"
;
String s4 =
"JAVA"
;
String s5 =
"programming"
;
String s6 =
"hello"
;
System.out.println(
"\nString : "
+s1);
System.out.println(
"\nLength : "
+s1.length());
System.out.println(
"\nConcatination : "
+s2.concat(s3));
System.out.println(
"\nSub String : "
+s1.substring(
6
));
System.out.println(
"\nSub String : "
+s1.substring(
3
,
8
));
System.out.println(
"\nEquals : "
+s2.equals(s3));
System.out.println(
"\nEquals : "
+s2.equals(s6));
System.out.println(
"\nUpper case : "
+s5.toUpperCase());
System.out.println(
"\nLower case : "
+s4.toLowerCase());
System.out.println(
"\nTrim : "
+s1.trim());
}
}
Java
String Manipulation Concept