⭐What are comments in Java?
And Explain all the comments in Java.
⭐What are types of errors in Java?
No spam
No googl_e
Answers
Answer:
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.
Runtime errors
If there are no syntax errors, Java may detect an error while your program is running. You will get an error message telling you the kind of error, and a stack trace that tells not only where the error occurred, but also what other
There are three types of Java comments:
Single-line Comments. As the name suggests, it is for the beginners and is in a single line Java comments. ...
Multi-line Comments. ...
Documentation Comments
Question : What are types of errors in Java?
Answer : There are three kinds of errors: syntax errors, runtime errors, and logic errors. These are errors where the compiler finds something wrong with your program, and you can't even try to execute it. ... The compiler will tell you where it got into trouble, and its best guess as to what you did wrong.