234k views
4 votes
Which of the following cannot cause a syntax error to be reported by the Java compiler? Question 12 options: A) Missing */ in a comment that begins with /* B) An extra blank line. C) Missing ; D) Mismatched {}

User Zztop
by
4.8k points

1 Answer

2 votes

Answer:

B) An extra blank line

Step-by-step explanation:

An extra blank line or the spaces between characters in a Java program is referred to as a white space. Java compiler Ignores these whitespaces as such an "extra blank line" without any writing will not result in a syntax error to be reported.

for example all this are valid in java

int a = 5;

int a = 5 ; // This is still valid, the empty space. same rule applies if there was just an empty blank line.

User Jimmi
by
5.3k points