Syntax - rules for writing language constructs (which constructs belong to the language).
Semantics - the meaning of language constructs (how constructs should be worked out by a computer).
A semantic error is comparing strings with a comparison operator (String == String) instead of using the equals function.
Syntax error - the absence of a semicolon at the end of the line, errors in the name of the called functions.
Comments
Leave a comment