What is the correct character for terminating a statement in Java?

What is the correct character for terminating a statement in Java?

A. A colon (:)

B. An end-of-line character

C. A tab character

D. A semicolon (;)

Answer:

D. A semicolon (;)

Explanation:

Unlike with some other programming languages, the proper way to terminate a line of code is with a semicolon (;), making D the only correct answer.


Comments