title: About less than and negative values?
body: <p>I just have a small beginners question, and it's about the code below. I want to check if the amount that the customer deduct from a credit account + the current balance don't getting lower than -5000 ? It's not working, and I'm wondering what I have done wrong? Is it about negative values? Help preciated!</p>
  
  <pre><code>// deduct credit account
  if(type == "credit") {
      if((amountOut + creditAccountList.get(index).getAccountBalance()) &lt; -5000) {
         System.out.println("Sorry! No deduct");
      }
  }
  </code></pre>
  
  <p>EDIT:
  The amountOut is a positive number that the customer enters. I still don't get it to work!? Could it be done in some other way? It seems so simple, byt yet so comlicated for me right now! I just want to prevent the customer to deduct a value if the balance is -5000? The problem is that the balance is a negative number.</p>