What does the following Java statement display on the output

What does the following Java statement display on the output window?                   System.out.println(\"\\\"\\tTest\\\\\\\\\ It\\\'\")

Solution

Answer:

This statement will print like below System.out.println(\"\\\"\\tTest\\\\\\\\\ It\\\'\"):

\"   Test\\\\
It\'

if we use escape character \'\\\' before any character in System.out.println it will recongnize like a chracter in that statement

\\\" will display \"

\\t will give tab

\"Test\" will print like \"Test\"

\\\\ will display \\

\\\\ will display \\

\ will return newline

It will print \"It\"

\\i will display \'

finally it will print like

\"   Test\\\\
It\'

What does the following Java statement display on the output window? System.out.println(\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site