Computer Science, asked by aarongeorge27, 12 days ago

Rewrite the program after correcting errors:-

class case

{

static void continue()

{

int c=a*b;

System.out.println(“Product=”+c);

}
}

Answers

Answered by sujayG17
0

Answer:

Errors:- Syntax errors are :-

i) variables a,b and c are not initialized.

ii) continue is a keyword used in switch case and loops. cannot be used as a method name

Explanation:

Correct program:-

class case

{

int a=2, b=3;

static void product()

{

int c=a*b;

System.out.println("Product= " +c);

}

}

Similar questions