When are syntax errors and runtime exceptions detected?
Both are always detected before any code is executed.
Runtime exceptions are detected before syntax errors.
Both are detected only after the program has started running.
Syntax errors are detected before execution begins; runtime exceptions arise while valid syntax is executing.