-2

I have the below string as shown and as shown below the string should be printed in same format

 -t "|" -e "

so what I have tried is

String s ;
args = String.valueOf(" -t");
args = String.valueOf(args) + String.valueOf(" |");

Please advise, is it correct?

Maroun
  • 94,125
  • 30
  • 188
  • 241
gfhtg hghg
  • 11
  • 1
  • 7

1 Answers1

7

To print " you have to print \"

System.out.println(" -t \"|\" -e \"");
Soumitri Pattnaik
  • 3,246
  • 4
  • 24
  • 42