Which of the following does not contain a syntax error? a. System.out.println("Hello world!"); b. System.out.println(Hello world!); c. System.out.println('Hello world!'): d. System.out.println("Hello world!");

Respuesta :

Answer:

a. System.out.println("Hello world!");

d. System.out.println("Hello world!");

Explanation:

Option b doesn't have the apostrophe within the bracket so it's incorrect.

Option c doesn't have the correct double apostrophe within the bracket so it's incorrect. Running option b and c code will not compile properly and give an error.

Answer:

Option A and B

Explanation:

:)