If you want to output the text "hi there", including the quote marks, which of the following could do that?


If you want to output the text "hi there", including the quote marks, which of the following could do that?


a) System.out.println("hi there");

b) System.out.println(""hi there"");

c) System.out.println("\"hi there");

d) System.out.println("\"hi there\"");

e) none, it is not possible to output a quote mark because it is used to mark the beginning and ending of the String to be output.

Answer: d. Explanation: \" is an escape sequence used to place a quote mark in a String, so it is used here to output the quote marks with the rest of the String.