0

Can I print all strings in a different paragraph? For example:

System.out.print("name"); name= SC.nextLine(); System.out.print("age"); age= SC.nextLine(); System.out.println("Name: " + name); System.out.println("Age: " + age); 

And then, when I run them, this will show up:

Name: (Type Name) Age: (Type Age) Name: JavaDotExE Age: 20 

Is it possible?

1
  • 1
    Is this all you need System.out.println("")? Just an extra blank line? Commented Oct 7, 2021 at 3:06

1 Answer 1

1

Use this: System.out.println() will add extra blank line to console.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.