- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java String Class Tutorial
The java.lang.String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class. Strings are constant, their values cannot be changed after they are created.
Example
public class StringDemo { public static void main(String args[]) { String string1 = "saw I was "; System.out.println("Dot " + string1 + "Tod"); } }
Output
Dot saw I was Tod
- Related Articles
- Java String, StringBuffer and StringBuilder Tutorial.
- String class in Java
- Java Regular Expressions Tutorial
- What is Java String Class?
- Difference between String class and StringBuffer class in Java
- What is special about string class in Java?
- Difference Between String and StringBuffer Class in Java
- What is the package for String Class in Java?
- Why String class is immutable or final in Java?
- Check whether String is an interface or class in Java
- Java Program to create String to super class type mapping
- StringJoiner Class vs String.join() Method to Join String in Java
- When can we use intern() method of String class in Java?
- Why String class is popular key in a HashMap in Java?
- Convert Long into String using toString() method of Long class in java

Advertisements