-3

can i use some diffrent method to print "you" i.e within double quotes. I am giving code System.out.println("you"); and it is giving output you What should i do to make my output "you" i.e within double quotes

2 Answers2

3

You can include a literal quote by escaping it with a backslash:

System.out.println("\"you\""); 
Michael
  • 37,794
  • 9
  • 70
  • 113
1

Use \" in double quotes to print "

System.out.println("\"Madhuri Anandani\""); 
KhAn SaAb
  • 5,175
  • 5
  • 29
  • 50