Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
May 7, 2019
  • facebook
  • twitter
  • in
  • Email

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Apply String Indentation

Beginning with JDK 12, we can indent strings via String.indent(int n), in which n is the number of spaces.Example : indent text "abc" with 10 spaces:

"abs".indent(10);
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
w3schools.com
googlecode.com