Computer Science, asked by purwasingh2222, 11 months ago

Find the error:
class Test {
public static void main(String args[]) {
int x = 10;
if(x == 10) {
int y = 20;
System.out.println("x and y: " + x + " " + y);
x = y* 2;
y = 100;
System.out.println("x is " + x);​

Answers

Answered by naksha24
4

Answer:

Find the error:

{class Test

{public static void main(String args[]) ))}

int x = 10;

if(x == 10)

{int y = 20;}

System.out.println("x and y: " + x + " " + y);

x = y* 2;

y = 100;

System.out.println("x is " + x);}

I hope this will be the answer

Answered by vmbashkalp2980
5

Explanation:

Find the error:

{class Test

{public static void main(String args[]) ))}

int x = 10;

if(x == 10)

{int y = 20;}

System.out.println("x and y: " + x + " " + y);

x = y* 2;

y = 100;

Similar questions