 
 Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create String object in Java?
You can create a String by -
- Assigning a string value wrapped in " " to a String type variable. 
String message = "Hello Welcome to Tutorialspoint";
- Creating an object of the String class using the new keyword by passing the string value as a parameter of its constructor. 
String message = new String ("Hello Welcome to Tutorialspoint");
- Passing a character array to the String constructor. 
char arr[] = {'H','e','l','l','o'};
String message = new String(arr);Advertisements
                    