Skip to content
Advertisement

How to add multiline Strings in Java?

How to make long queries more readable?

For example I have this one:

JavaScript

And it’s completely unreadable, are there any ways to beautify it?

Advertisement

Answer

Since Java 15, you can use text blocks:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement