In this level, we touched on several new topics: what literals are, what escaping is, and why escape sequences came into existence. And also we continued to get to know classes. This time around our agenda featured the String class, as well as the nuances of working with strings. Before moving on, make sure you've got a solid understanding of all this.

Literals in Java

As a rule, when a developer is creating an application, he or she only knows its structure and doesn't make assumptions about what specific data it will process. That said, there are some situations in program code when you need to explicitly specify some data (for example, a set number of iterations or a message to display). This is where literals come to the rescue. In this article, we'll take another look at well-known types of literals and how to use them correctly.

Escaping characters

You'll gradually learn how to escape characters, even if it seems at present that there are too many rules. It doesn't hurt to read something extra on the topic. For example, there's this helpful article. You can also add it to your bookmarks and periodically take a peek until you no longer need it!

The String class in Java

This is a very important topic, and this clear article is very helpful to add some order to your knowledge. It will let you once again run over the key features of the String class, refresh your memory with examples of working with and creating strings, adding and comparing strings, converting an object/primitive into a string, converting a string into a number, etc. At the end, you will find several resources to help you dig deeper into the topic and even prepare for some possible interview questions.


undefined
9
Опрос
Working with strings,  9 уровень,  8 лекция
недоступен
Working with strings
Working with strings