best core java training in bangalore


Presentation Description

Infocampus provides best core java training in bangalore with the 100% job assistance.Attend 4 days free demo classes for java course .Learn OOPs concept,packages,thread,spring,hibernate etc in Core and Advanced Java Institute .Training is given by the 10+ years experienced trainers in java training center .Infocampus provides working on real time project.Pay fees in installaments for java/j2ee classes .Complete practical session is available for Advance Java Training.To get the free demo classes and for the 100% placement assistance contact at : 9738001024 or enquire at :


Presentation Transcript

slide 1:

In Java Why String is immutable Presented By Infocampus

slide 2:

String : In computer programming a string is traditionally a sequence of characters either as a literal constant or as some kind of variable. Java course in bangalore

slide 3:

A Java string is therefore a series of characters collected together like the word "Java" or the phrase "practice makes perfect". Create a string in the code by writing its chars out between double quotes. String str "Java" This picture shows the string object in memory made up of the individual chars J a v a.

slide 4:

Java String is class that java vendors have written and put into java API . It is present in java.lang package. best core java training in bangalore It is a immutable classmeans once we created its object we can not modify thatif we will try to modify new object will be created.

slide 5:

String is immutable

slide 6:

Performance: By making Strings immutable it is possible to cache them more aggressively java training center bangalore Security: Parameters are typically represented as string in network connections database connection urls usernames/passwords etc. If it were mutable these parameters could be easily changed.

slide 7:

Synchronization and concurrency: It make String immutable automatically makes them thread safe thereby solving the synchronization issues. Class loading: String is used as arguments for class loading. If mutable it could result in wrong class being loaded because mutable objects change their state.

slide 8:

Caching: When compiler optimizes String objects it sees that if two objects have same value a"test" and b"test" and thus you need only one string object for both a and b these two will point to the same classes bangalore

slide 9:

How string is Immutable Infocampus Software Training Institute

slide 10:

Strings are considered immutable in Java because when we assign new value to a string then the new value is not allocated at the same address space in memory where the older value was stored.

slide 11:

Instead the old value is discarded and the space it took in the memory is cleaned up by the JVMs garbage collector and new space is allocated in the memory where new value of the string is stored. Java/j2ee classes bangalore

slide 12:

JDK provides two classes to support mutable strings: 1 StringBuffer 2 StringBuilder.

slide 13:

String Buffer : StringBuffer class is used to create a mutable string object. It represents growable and writable character sequence. It is also thread safe i.e multiple threads cannot access it simultaneously. Infocampus Software Training Institute

slide 14:

Why StringBuffer As we know that String objects are immutable so if we do a lot of changes with String objects we will end up with a lot of memory leak. So StringBuffer class is used when we have to make lot of modifications to our string.

slide 15:

String Builder : StringBuilder is identical to StringBuffer except for one important difference it is not synchronized which means it is not thread training center bangalore Its because StringBuilder methods are not synchronised.

slide 16:

if multiple threads are accessing a StringBuilder instance at the same time its integrity cannot be guaranteed. However for a single thread program most commonly doing away with the overhead of synchronization makes the StringBuilder faster.

slide 17:

Difference between string stringbuffer and stringbuilder

slide 18:

- String is immutable whereas StringBuffer and StringBuider are mutable classes. - StringBuffer is thread safe and synchronized whereas StringBuilder is not thats why StringBuilder is more faster than StringBuffer.

slide 19:

- String concat + operator internally uses StringBuffer or StringBuilder class. - For String manipulations in non-multi threaded environment we should use Advance java training in bangalore StringBuilder else use StringBuffer class.

slide 20:

This is the short description about the String class. To get the more knowledge and to get the job as java developer easily join Infocampus Software Training Institute.

slide 21:

Learn Core Advance Java in Infocampus Get 100 Job support

slide 22:

 CONTACT  INFOCAMPUS   9738001024   Enquire at : a-training-bangalore.html

slide 23:

Visit at : 1 st 4 th Floor Above HDFC Bank Near Kalamandir Marathahalli Bangalore

slide 24:


authorStream Live Help