String concatenation in java with examples || string concat() method || java.lang.string

preview_player
Показать описание
This video covers string concatenation in java, where we are going to learn in how many ways we can perform string concatenation in Java.

We can perform string concatenation by using two different ways in string in java

The + operator is also called as java string concatenation operator and used widely in java programming whereas string concat() method
accepts a string argument and concat the string accordingly.

So let's learn about java string concatenation in a brief and let's understand how to solve these following questions :

1 )how to do string concatenation in java using + operator?

2) how to perform string concatenation in java without using concat function?

=============================

follow us on Facebook:

Music :
-----------
credits : -

Creative Commons — Attribution 3.0 Unported— CC BY 3.0

-----

intro template :
Рекомендации по теме
Комментарии
Автор

String concatenation in case of "+" operator, always starts operation from left to right.
10+20+"java" ===> will print 30java
"java"+30+4 ===> will print java304

travel_withUs
Автор

Thanks for such a nice explanation and clearing my doubts!!

sudhadadhich
Автор

Hai, In this case both doing same work so what is the difference between these two and how +operator internally works please explain this

keerthietthireddy
Автор

Abhilash u r doing good please make video on spring security and hibernate

meetsaurabhtiwari
Автор

Excellent videos ... clear explanation .can you please prepare video about why string is immutable ?

sureshm
Автор

// String s1 = "HiHello"; // "HiHello" store in string pool
// String s2 = "Hi" + "Hello"; // store in string pool
// System.out.println(s1 == s2); // => Why is return true

String s1 ="HiHello"; // store in string constant pool
String s2 = "Hi".concat("Hello"); // where it will store ?

System.out.println(s1 == s2); // => Why is return false

ninosalkaton
Автор

Hi Got a doubt

Since
String part1 = "JumboJade";
String part2 = "Jumbo"+"Jade";
sopln(part1 == part2) returns true;

but
String x = "Jumbo"
String y = "Jade"
String z = x+y;
sopn(part1 == z) return false

can someone explain why please?

prakhartandon
Автор

correct your pronunciation its annoying, but explained well, but it can be explained in a minutes but its a long video

thannasip