Computer Science, asked by aizah29, 6 months ago

What is the output of the following:

String a=" Yesterday I did nothing \n and today I'm finishing \t\' what I did

yesterday\'";

System. out. println(a);


Answers

Answered by CoderRishav
2

Answer:

Yesterday I did nothing

and today I'm finishing 'what I did yesterday'

Explanation:

\n - next Line

\t - tab or space

\' - gives '''sign

Answered by anindyaadhikari13
3

Question:-

  • Write the output of the following code snippet.

Output:-

Given code,

String a="Yesterday I did nothing \n and today I'm finishing \t\' what I did yesterday\'";

System.out.println(a);

The output for the code will be,

Yesterday I did nothing

and today I'm finishing 'what I did yesterday'

Note:-

\n - used for new line.

\t - used for giving space or tab

\' - used for giving a single quote '''

Similar questions