title: Checking if a list of numbers are divisible by the two inputs?
body: <p>I'm writing a  program where you input two divisors and a list of numbers you want to check are divisible by the two numbers you inputed. </p>
  
  <p>Here's an example of how the output should look like:</p>
  
  <pre><code>Please input a command: A
   A [Create a new divisible test] 
   [Type two divisors]: 2 6
   [Input a list of numbers in one single line]: 2 4 6 9 15 18 19 25 30
  
  
  Please input a command: D
   D [Display the information]
    ( 2 4 6 9 15 18 19 25 30 ) are numbers to check
    ( 2 4 6 18 30 ):   are divisible by 2
    ( 6 18 30 ):  are divisible by 6
    ( 6 18 30  ): are divisible by both 2 and 6
  </code></pre>
  
  <p>My problem is it won't check which number is divisible by the two divisors, instead it prints out </p>
  
  <pre><code>  ( 2 4 6 9 15 18 19 25 30 ) are numbers to check
    ( 2 4 6 9 15 18 19 25 30  ):   are divisible by 2
    ( 2 4 6 9 15 18 19 25 30  ):  are divisible by 6
    ( 2 4 6 9 15 18 19 25 30   ): are divisible by both 2 and 6.
  </code></pre>
  
  <p>here's my code:</p>
  
  <pre><code>class Divisible {
      private int divisor1;
      private int divisor2;
      public String numbers;
  
      public Divisible() {
          divisor1 = (Integer) null;
          divisor2 = (Integer) null;
          numbers = " ";
      }
  
      public Divisible(int div1, int div2, String num) {
          this.divisor1 = div1;
  
          this.divisor2 = div2;
  
          this.numbers = num;
      }
  
  
      private boolean isDivisible1(int input) {
          boolean isDivisible1 = true;
  
          return (input % divisor1 == 0);
      }
  
      private boolean isDivisible2(int input) {
  
          boolean isDivisible2 = true;
  
          return (input % divisor2 == 0);
      }
  
      public String printDivisible1() {
  
          if (this.isDivisible1(divisor1)) {
              System.out.println();
              System.out.println("are divisible by " + divisor1);
          }
          return numbers;
      }
  
      public String printDivisible2() {
  
          if (this.isDivisible2(divisor2)) {
              System.out.println(" are divisible by " + divisor2);
          }
          return numbers;
      }
  
      public String printDivisibleBoth() {
          if (this.isDivisible1(divisor1) &amp;&amp; this.isDivisible2(divisor2))
              System.out.println(" are  divisible by " + divisor1 + " and " + divisor2);
          return numbers;
      }
  }
  </code></pre>