In this lesson introduces strings and provides an in-depth explanation of text processing in Java. It includes several very important topics surrounding strings – the StringBuilder class, concatenation and why it’s a slow operation, the methods concat(), indexOf(), contains(), split(), replace(), and many more.
As always, we advise you to pause the video right before the solving part of each problem and try to do the exercises on your own first. Then, if you have difficulties, just watch the provided solutions in the video.
*The exercise descriptions are to be found in the PDF document at the end of this article.
What is a String?
- Reading and printing strings
- Converting a String from and to a char array
- indexOf(), lastIndexOf()
Building and Modifying Strings
- Using the StringBuilder class
- Why concatenation is a slow operation?
Watch the video and solve the problems. To better understand the material, do the coding exercises and implement the knowledge you acquired. Writing code is the only way to master the skill of code.
Submit your code in the SoftUni Judge System: