title: method that return only odd numbers (int) in java
body: <p>So, I am trying to create a method that return random numbers within range (1-43), but only odd numbers. I used do-while statement, but the program keeps returning many kinds of numbers - even and odd alike. can you please tell me whats wrong with it, so it will return only the requested type of number (depended on: % = 0/1)?</p>
  
  <pre><code>public static String generateRandomOddNumbersWithinRange(){
  
      int randomNum = ThreadLocalRandom.current().nextInt(1, 43 + 1);
  
      do {
          return Integer.toString(randomNum);
  
      } while (randomNum % 2 == 1);
  }
  </code></pre>