Question1.1

mail@pastecode.io avatar
unknown
java
2 years ago
574 B
3
Indexable
Never
public class QuestionOnePointOne 
{
    public static void main(String[] args) 
    {   //Syntax Error Example
        System.out.println(Hello, World)
        //solution to Syntax Error
        System.out.println("Hello, World");
        // RuntimeError Example
        int a = 20/0;
        //solution to RuntimeError
        int b = 20/2;
        //Example of Logic Error
        int A = 20;
        int B = 2;
        System.out.println("The sum of A & B is " + A+B);
        //solution to Logic Error
        System.out.println("The sum of A & B is " + (A+B));
    }
}