Which of the following is not syntactically legal in Java?
a) public class Foob) System.out.println("Hi");
c) { }
d) s t a t i c main(String[ ] args)
e) only b is legally valid, all of the rest are illegal
Answer: d.
Explanation: The Java compiler would not recognize “s t a t i c” as “static” because the Java compiler treats white space (blanks) as separators between entities. The other statements are all legal, including “{ }” which is a block that happens to have no statements within it.