Home / Questions / Write the output for the following: System.out.println("Incredible"+"\n"+"world");
Explanatory Question

Write the output for the following:

System.out.println("Incredible"+"\n"+"world");

👁 63 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Output of the above code is:

Incredible
world

\n is the escape sequence for newline so Incredible and world are printed on two different lines.