Computer Science, asked by puja1295, 3 months ago

(e) Write the output of the following code:
System.out.print("ALL");
System.out.println(" THE BEST):​

Answers

Answered by anindyaadhikari13
2

Question:-

Write the output of the following code.

Output:-

ALL THE BEST.

Explanation:-

Given code,

System.out.print("ALL");

System.out.println(" THE BEST");

After execution of first line,

Output is:- ALL

Now, it will remain in the same line(no new line is added)

Now, second line is executed.

Output:- THE BEST

So, final result:- ALL THE BEST

Answered by BrainlyProgrammer
2

Answer:

Output:

ALL THE BEST

Explanation:

There arev2 types of print statement

  1. System.out.print()- it will print and the cursor will remain in the same line
  2. System.out.println()- it will print and the cursor will move to next line.

That's why output is "ALL THE BEST"

Similar questions