We help IT Professionals succeed at work.

Java Programming

Arnold LAW
Arnold LAW asked
on
How to create a blank space between two lines (or statements) in Java.
Comment
Watch Question

Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016
Commented:
What is your requirement, can you give an example?
To create a space between a character or a word you could insert “ “ into the String or append it. To achieve a new line, use println() or print the newline character, \n.
Are you talking about case like this,

String value = "First Line" +

                "Second Line" +

                "third line";
awking00Information Technology Specialist
Commented:
System.out.println("line1\n\nline2\n\nline3\n\n") will produce this -
line1

line2

line3
awking00Information Technology Specialist
Commented:
Can you provide us with examples of your statements and how you want them to appear or want them changed or whatever? We need a little more detail to ascertain what you want to be accomplished.
Closing the question due to inactivity