Rewrite the program after correcting errors:-
class case
{
static void continue()
{
int c=a*b;
System.out.println(“Product=”+c);
}
}
Answers
Answered by
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
Social Sciences,
1 month ago
Geography,
1 month ago
Math,
4 months ago
Computer Science,
11 months ago
Physics,
11 months ago
English,
11 months ago