Can any one write a code in java for the below proble | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can any one write a code in java for the below proble

suppose i have a string "Elephant" You havr to put "X" before E..The output should be "XElxelephant" .

6th Oct 2017, 3:18 PM
Mustaq Shaik
Mustaq Shaik - avatar
1 Answer
+ 2
Use concantenation. (fancy word for adding to strings with the + operator) String one = "hello "; String two = "World!"; String result = one+two; // result is: Hello World!
6th Oct 2017, 4:45 PM
Rrestoring faith
Rrestoring faith - avatar