-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
  • 41,989
  • 11
  • 82
  • 128
1

Use \" in double quotes to print "

System.out.println("\"Madhuri Anandani\""); 
KhAn SaAb
  • 5,248
  • 5
  • 31
  • 52