Java for beginners - Chapter 10 : Strings How to create a string object? What is immutable? - Part 1

preview_player
Показать описание
A quick and awesome explanation of Strings in Java
Strings :
How to create a string object?
What is the meaning of string is immutable?

Generally, String is a sequence of characters.
In java, string is an object that represents a sequence of characters.

Two ways to create String object :
String literal.
new keyword.
String Literal :
String s="Hello World";

new keyword :
String s =new String("Hello World");

String is immutable in java :
Immutable means unmodifiable.
Once string object is created its data or state cant be changed but a new string object is created.

ankpro
ankpro training
C#
C sharp
Bangalore
Rajajinagar
Selenium
Coded UI
Mobile automation testing
Mobile testing
JQuery
JavaScript
.Net
C
C++
Components of the .Net framework
Hello World
Literal
Keywords
Variable
Data types
Operators
Branching
Loops
Arrays
Strings
Structures
Enums
Functions
Рекомендации по теме