❮ Previous Next ❯

STRING

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,StringBuffer,StringBuilder,StringTokenizer .

String Class:

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:

(Approach  1):

(SCP ---  STRING  CONSTANT  POOL)   

(Approach  2):


HEAP
SCP
S1_ _ _ _ _
JAVA
JAVA



Example:

                         String  s1= “java”;
                    System.out.println(s1.concat(“race”)); 
      
Output:-                       javarace

❮ Previous Next ❯



  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved