title: Using Java, How can I find the prime number that is the next smallest to a given integer?
body: <p>I am confused on a coding project. I am supposed to return the smallest prime number bigger than the <code>integer "num",</code> for example <code>smallestPrimeBiggerThan(20)</code> should return <code>23</code> I already have the code to determine if the number is prime, but I am not sure how to do the rest of the code. I already looked onto this site, however the rest of the explanations are for C and C++. I am not sure how to translate the code between C to Java. Also, I would prefer if this were to be a simple way of completing it, as I am new to code and do not know much about the more complex parts (Arrays and the like).</p>
  
  <p>Here is an example for the arguments</p>
  
  <p>Integer n is 80, so the smallest prime number next to the integer is 83, so the method would return 83</p>
  
  <p>Here is a baseline for the code</p>
  
  <pre><code>public static void main(String[] args) {
      System.out.println(smallestPrimeBiggerThan());
  
  }
  
  public static int smallestPrimeBiggerThan(int num) {
  
  }
  </code></pre>