Java String Introduction
In general, a string is nothing but a sequence of characters identified by double quote(" ").
In java,Programming each string is an object.
Java supports 4-inbuilt classes specifically used to represent and manipulate strings like:
String is an inbuilt class present in java.lang package, specifically used to represent and manipulate strings.
In this context there are two approaches two represent strings which are as followed:
- String s1= “java”;
- String s2= “race”;
- String s3= “java”;
(SCP --- STRING CONSTANT POOL)
- String s1= new string(“java”);
- String s2= new string (“race”);
- String s3= new string(“java”);
|S1_ _ _ _ _
- Here, each strings are immutable ( non- changeable behaviour).
String s1 = “java”; System.out.println(s1.concat(“race”)); Output: javarace
Java Training | Python Training | Machine Learning with Python Training | Deep Learning with Python Training | Projects
SILAN Technology Call to: 9439202111 | 9658317757 | 0674-2361252