title: Time Complexity for this PrimeNumbers algorithm in Java
body: <p>Am new to time complexity analysis...</p>
  
  <p>Would appreciate if someone could tell me if this is quadratic or not. And also if there's simpler way to make it o(1).</p>
  
  <pre><code>public class PrimeNumbers {
      public boolean isPrime(int n) {
          boolean retValue = true;
          for (int i = 2; i &lt; n; i++) {
              if (n % 2 == 0) {
                  retValue = false;
              }
          }
          return retValue;
      }
  }
  </code></pre>
  
  <p>If someone could break it down why it is what it is, it will definitely help me learn. :)</p>
  
  <p>Thanks a lot!</p>