mercredi 12 octobre 2016

Why "if" loop shows error in Testng [on hold]

First of all why is there error for if loop statement, secoundly whats the reason for different types of error in the if loop when condition statment is littly modified.

The code followed by it's error:

public class WelcomePage extends Sample {
Login log = new Login();
int i = 1;
int j=1;

@Test
public void Activity() throws InterruptedException {

    if(j=1;j<8;j++){                   //ERROR in this line

    }
    Transcript();
}
}

enter image description here

The 2nd code followed by it's error:

public class WelcomePage extends Sample {
Login log = new Login();
int i = 1;
int j=1;

@Test
public void Activity() throws InterruptedException {

    if(int j=1;j<=8;j++){            //ERROR in this line

    }
    Transcript();
}
}

enter image description here

  • Why each error is so diierent from each other with a minor change in the if statement?
  • And what is the solution for this?

Aucun commentaire:

Enregistrer un commentaire