title: I want to sort only odd numbers in an array in ascending order and leaving even numbers at their orignal place in java
body: <p><a href="https://i.stack.imgur.com/JEPYF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JEPYF.png" alt="enter image description here" /></a></p>
  <p>Below is the code in image where i have sorted array in ascending order
  but i am unable to sort only odd numbers, leaving even number at their original place like below
  [<strong>5</strong>, 8, 6, <strong>3</strong>, 4]  =&gt;  [<strong>3</strong>, 8, 6, <strong>5</strong>, 4]</p>