Staic and non static Module 3 | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos

Selenium Training Forum

staic and non static Module 3

N
Nagajyothi Post 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);
}
}

S

Instructor

Support Team Reply on 09/10/2019

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