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
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
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