Computer Science, asked by williamssiren686, 7 months ago

what to do if java does not compile my code and does not even show if there are errors or there is no syntax errors

Answers

Answered by khushi02022010
3

Answer:

No matter how smart or how careful you are, errors are your constant companion. With practice, you will get slightly better at not making errors, and much, much better at finding and correcting them.

There are three kinds of errors: syntax errors, runtime errors, and logic errors.

Syntax errors

These are errors where the compiler finds something wrong with your program, and you can't even try to execute it. For example, you may have incorrect punctuation, or may be trying to use a variable that hasn't been declared.

Syntax errors are the easiest to find and correct. The compiler will tell you where it got into trouble, and its best guess as to what you did wrong. Usually the error is on the exact line indicated by the compiler, or the line just before it; however, if the problem is incorrectly nested braces, the actual error may be at the beginning of the nested block.

Similar questions