Computer Science, asked by Anonymous, 11 months ago

System.out.print(“BEST “); System.out.println(“OF LUCK”); Choose the correct option for the output of the above statements:


rakeshchennupati143: both of them are correct
rakeshchennupati143: print() print in the line
rakeshchennupati143: while println() does that in next line

Answers

Answered by Aarushi665
23

Output:

BEST OF LUCK

System.out.print() does not add a new line at the end because of which ‘OF LUCK’ gets printed on the same line as ‘BEST’.

\red


InnovativeD2: wrong
Aarushi665: I'll edit it
Answered by InnovativeD2
8

Answer:

Java programming.

(b)System.out.println("OF LUCK");

This option is the correct one because in the first statement the inverted commas are wrong . It is always entered in the opposite directions.

This statement will give us the result"OF LUCK".

(a) The first statement while compiling will give an error and it will not be executed.

Please mark as brainliest and follow me

Similar questions