title: While Loop - Sum of even numbers between two inclusive integers
body: <p>EDIT: Lol I would've never thought you guys would be such savages. I thought this would be the right place for a college student to come and seek for answers. If I didn't care, why would I even be here.. Basically my question is different from the other ones because I do need the first loop to state my even numbers ie: 10  12 14 16 18 20. I sincerely hoped I would get some feedback on how to reinstate the original value of firstNum for the second loop, not criticism expecting to get selected as an answer for points in a matter of seconds.</p>
  
  <p>I've implemented a code that I saw as an answer in a very similar question on the forum. Yet when I compile it, the output for my sum code doesn't return anything. It's just blank. Can I get some feedback on what I am missing or doing wrong? Thank you. <em>BTW I can only use while loop.</em></p>
  
  <pre><code>  System.out.println("Enter an integer:");
    int firstNum = keyboard.nextInt();
  
    System.out.println("Enter another integer larger than the first one:");
    int secondNum = keyboard.nextInt();
  
    System.out.println();
  
    int mod = firstNum % 2;
    int sum = 0;
  
    if (mod != 0)
    {
      firstNum++;
    }
  
    System.out.print("Even numbers: ");
    while (firstNum &lt;= secondNum)
    {
      System.out.print(firstNum + " ");
      firstNum += 2;
    }
  
    System.out.println();
  
    System.out.print("Sum of even numbers: ");
    while (firstNum &lt;= secondNum)
    {
      System.out.print(sum);
      sum += firstNum;
      firstNum += 2;
    }
  </code></pre>