Basic errors for in java:
There are three types of errors in Java: syntax errors, runtime errors, and logical errors.
1) Syntax errors occur when the code doesn't follow the rules of the Java language.
2) Runtime errors occur during the execution of the program and can be caused by things like division by zero or trying to access an element of an array that doesn't exist.
3) Logical errors occur when the program runs without any errors, but it doesn't produce the expected
how to resolve above errors:
1) solve syntax error in java: capitalize keywords, rather than use lowercase.
2) To resolve a runtime error: first identify the error message and its context, then check for logical, mathematical, or typographical errors in the code, ensure proper data types and variable initialization, and consult documentation if necessary.
3) solve logical error in java: use debugging tools, print statements, and break down the problem into smaller parts, testing each part separately
class Vs objects in java
Errors oocurs in basic programm:
Resolve:
1-public void main converting into public static void main
2- space between the args
Ex:
(String[] args)
3- system.Out.println this method contain capital S
4- final bug fix in this program is command line ends with semicolon.
Ex:
(welcome to java programming)~(Welcome to java programming);
|----|
"Here are some conflitcs to resolve "
Top comments (0)