Home / Questions / System.out.print("BEST ");     System.out.println("OF LUCK"); Choose the correct option for the output of the above statements BEST OF LUCK BESTOF LUCK
Explanatory Question

System.out.print("BEST ");
     System.out.println("OF LUCK");

Choose the correct option for the output of the above statements

  1. BEST OF LUCK
  2. BEST
    OF LUCK

👁 75 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

Option 1 — BEST OF LUCK is the correct option.
System.out.print does not print a newline at the end of its output so the println statement begins printing on the same line. So the output is BEST OF LUCK printed on a single line.