public class Deven implements Runnable {

  // to be recovered from the main
  private int evenin;

  //constructor to define a parameter to the class
  public Deven(int evenin){
    this.evenin = evenin;
  }

  public void run(){
    System.out.print("Even Numbers before "+ evenin +" are: ");
    for (int i = 1; i <= evenin; i++) {
       if (i % 2 == 0) {
      System.out.print(i + " ");
       }
    }
  }

}
