How to prove that Strings are immutable in Java? | Strings in Java | ABC

  Рет қаралды 16,853

ABC - Technology Training & Upskilling

ABC - Technology Training & Upskilling

Күн бұрын

In today's Episode, learn How to prove String is immutable in Java & Why String is immutable in Java.
About the trainer: Mr. Manjunath Aradhya, a technocrat by profession, a teacher by choice and an educationist by passion. Under his able leadership, ABC for Technology Training which is a National brand enabling the creation of thousands of careers annually in the IT Sector. He has extensive experience working as a Business associate with Wipro Technologies. He has also served as a corporate trainer to many other leading software firms. He has been providing technical assistance to placement cell of various Engineering colleges. He has also authored numerous hot selling engineering and other textbooks which are published by Pearson Education, an internationally acclaimed publication house headquartered in London. Other renowned international publishers such as Cengage Learning headquartered in Boston, United States, have published books authored by him. C Programming and Data Structures book published by Cengage India Private Limited authored by a profound scholar Mr. Manjunath Aradhya is the prescribed book in Dr. Hari Singh Gour University which is the Central University and the oldest university in the state of Madhya Pradesh (MP), India
To learn more about Technology, subscribe to our KZbin channel:
x.co/fresher
#StringBuffer #StringBuilder #mutable #immutable #Stringinjava #Javatutorials #Tutorialsforfreshers #howtocrackinterview #Javainterviewquestions #ABC #ManjunathAradhya
How to print duplicate characters present in a String using Maps in java
• How to print duplicate...
Introduction to Strings in Java
• Introduction to String...
Computing length of String in C
• Computing length of St...
Computing length of String in Java
• Computing length of St...
Copying one String into another in Java
• Copying one String int...
Reversing a String in Java
• Reversing a String in ...
Palindrome Program in Java | Part 1
• Palindrome Program in ...
Palindrome Program in Java | Part 2
• Palindrome Program in ...
How to convert lowercase Strings to uppercase in Java | Part 1
• How to convert lowerca...
How to Convert a String with spaces from lowercase to uppercase in Java | Part 2
• How to Convert a Strin...
Convert First Letter of Each Word From Lowercase to Uppercase in Java
• Convert First Letter o...
How to count vowels consonants & special symbol in a string
• How to count vowels, c...
How to verify if a String contains only integers
• How to verify if a Str...
Pangram Program in Java
• Pangram Program in Jav...
Loops in Java | for | while | do-while | for-each loop in java
• Loops in Java | for | ...
Introduction to MAP Data Structure in Java
• Introduction to MAP Da...
Accessing the Data in MAP Data Structure
• Accessing the Data in ...
Check if a String has ALL UNIQUE CHARACTERS using MAP Data Structure
• Check if a String has ...
How to print the First Non-Repeated character in a String using Maps in Java
• How to print the First...
How to print all Non-Repeated Characters in a String
• How to print all Non-R...
How to find the maximum occurring character in a String using Maps in java
• How to find the maximu...
For more updates ABC Course, follow us on:
Instagram: goo.gl/4BR1HA
Facebook: goo.gl/KjG9Hc
LinkedIn: goo.gl/pKRPEM
Twitter: goo.gl/vXyUb2
Contact us: 7676500600

Пікірлер: 16
@ABCforTechnologyTraining
@ABCforTechnologyTraining 5 жыл бұрын
Learn from Leaders, Learn from ABC. Watch our latest technical videos in your language: For Hindi:- bit.ly/2TRuGVP For Kannada:- bit.ly/31NH63M For Telugu:- bit.ly/2MuYRRP For Tamil:- bit.ly/2Num5Hz
@nagesh007
@nagesh007 5 жыл бұрын
Thanks for coming to KZbin
@nagesh007
@nagesh007 5 жыл бұрын
I was ur student , engineering batch : 2007 -2011
@sanilwadakar4581
@sanilwadakar4581 4 жыл бұрын
Sir sorry my doubt might be silly,but I want to ask When we use just string we use concat & when we use stringBuffer we use Append.. Why can't we use concat method only?
@shivankgarg1692
@shivankgarg1692 5 жыл бұрын
x = x.concat(y); System.out.print(x); Output :ABCTECH You had not stored the value of concatenated string in any variable that's why it was not getting concatenated
@ABCforTechnologyTraining
@ABCforTechnologyTraining 5 жыл бұрын
ABC appreciates your efforts. But you must understand that when you say x=x.concat(y), then you are actually creating a new string ABCTECH and making reference x to refer to the new String. The original string ABC would still be unchanged or immutable. A copy of the original ABC is taken and TECH is concatenated with it and x is made to refer to it. While if you use StringBuffer or StringBuilder class, it’s the original ABC that gets altered. Hope you get it.
@mcreyfonacier1982
@mcreyfonacier1982 5 жыл бұрын
you reassinged the x to a new value not changed it, so string class is not mutable.
@nagesh007
@nagesh007 5 жыл бұрын
Super sir.
@adarshsagar8
@adarshsagar8 5 жыл бұрын
By having a programming knowledge(Java or Python), is it possible to get a technical job without a College degree..? Sir please answer me..?
@srajsekhar4061
@srajsekhar4061 5 жыл бұрын
Well it's possible only in Bangalore . There are some campany they won't ask u any degree certificate and they only see the knowledge
@ganeshaitha664
@ganeshaitha664 4 жыл бұрын
Then what makes differ between stringbuffer and stringbuilder...? By both we can create mutable objects
@ABCforTechnologyTraining
@ABCforTechnologyTraining 4 жыл бұрын
It makes a lot of difference in a multi-threaded environment.
@chukkadhanalakshmi4853
@chukkadhanalakshmi4853 5 жыл бұрын
tq sir your explanation is very nice but it is not clear sir
@ABCforTechnologyTraining
@ABCforTechnologyTraining 5 жыл бұрын
We regret the lack of clarity. Can you please be more specific as to what isn't clear?
@SubelalPal
@SubelalPal 4 жыл бұрын
String s="abc" ; s="xyz" ; Output is coming xyz It is changing why????
@ABCforTechnologyTraining
@ABCforTechnologyTraining 4 жыл бұрын
That's right. Please understanding the meaning of immutable strings, in this example, you're NOT modifying the original string "abc", it would remain unmodified. In the second instruction, you're creating a brand new string called "xyz" and re-assigning the string reference variable to this new string. In simple words, this is just simple reference type assignment, the address of new String object is re-assigned to the reference variable 's'. Because of this re-assignment, the original String object "abc" will not have a reference pointing to it, hence it would be garbage collected.
Swap Two Strings In Java | Java interview questions | String Programs in Java | ABC
7:13
ABC - Technology Training & Upskilling
Рет қаралды 16 М.
Introduction to MAP Data Structure in Java | HashMap in Java with Example | ABC
12:40
ABC - Technology Training & Upskilling
Рет қаралды 44 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 139 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
How to prove string is an immutable in java ?
6:42
Gain Java Knowledge
Рет қаралды 1 М.
9.9 String is Immutable
6:49
Telusko
Рет қаралды 318 М.
#34 What is String in Java
7:24
Telusko
Рет қаралды 152 М.
Pangram Program in Java | Pangram Problem Solution | Interview Questions on Pangram | ABC
16:53
ABC - Technology Training & Upskilling
Рет қаралды 56 М.
Java Program to verify if one String is a rotation of another String | Java Tutorials for Beginners
8:34
ABC - Technology Training & Upskilling
Рет қаралды 17 М.
How to remove all white spaces from a String in Java | Strings interview questions in Java | ABC
10:03
ABC - Technology Training & Upskilling
Рет қаралды 18 М.
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 1,9 МЛН
How to print duplicate characters present in a String using Maps in java | strings programs in java
8:51
ABC - Technology Training & Upskilling
Рет қаралды 24 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 139 МЛН