Java - String - PowerPoint PPT Presentation

About This Presentation
Title:

Java - String

Description:

Learn Core Java Training in Chennai from Accord which is the best java training institute in Chennai. Be job ready with our certification courses. Register with us today if you want to learn either just the basics and the core of java or J2EE which is advanced java training as we provide you with the best java courses in Chennai. – PowerPoint PPT presentation

Number of Views:56

less

Transcript and Presenter's Notes

Title: Java - String


1
JAVA TRAINING INSTITUTE in CHENNAI
  • http//www.accordittraining.com/

2
What is a String in Java
  • In java, string is an immutable object which
    means it is constant and can cannot be changed
    once it has been created. 

3
Creating a String
  • There are two ways to create a String in Java
  • String literal
  • Using new keyword

4
String literal
  • In java, Strings can be created like this
    Assigning a String literal to a String instance

String str1 "Welcome" String str2 "Welcome"
5
Using New Keyword
  • Compiler only created one object and made both of
    the literals to point the same object. To
    overcome that approach we can create strings like
    this

String str1 new String("Welcome") String str2
new String("Welcome")
6
Contact US
www.accordittraining.com
 CALL US 91 9940289059
EMAIL enquiry_at_accordittraining.com
Write a Comment
User Comments (0)
About PowerShow.com