Staic and non static Module 3 | Selenium Forum
N
Nagajyothi Posted on 27/09/2019

Hi I am practicing module 3 exercise ,while i am doing this exercise its showing compile time error in exrecise,but when i am copy and paste it in eclipse the output is 11.can you please help me.Thanks.
public class test
{
static int x=0;
String name;
boolean b;

public static void main(String[] args) {
test t1= new test();
x=x+10;
//b=true;
t1.start();

}

public void start() {
x++;
System.out.println(x);
}
}


A
Ashish Thakur Replied on 09/10/2019

Thanks for your report, The issue has been resolved now.