title: Getting coordinates for 2D Array within ONE function
body: <p>How can I retrieve X and Y coordinates from a user within one function?(For java game needing coordinates for array)</p>
  
  <p><strong>"The getX function will ask the user for an X coordinate. It will return the number once entered by the user. getY has the same function, the message is adjusted to ask for the Y coordinate."</strong></p>
  
  <p>This is what I need to follow by for the function.
  The return values need to be used to place a number in a 2D Array.
  How do I achieve this in one function?</p>
  
  <pre><code>board[x][y] = 1;
  </code></pre>
  
  <p>EDIT: I can only do some much within java (for computing test, so marks won't be awarded for using anything out of what we have been taught - AQA AS Level).
  I need to scan inputs from the user in the function and return both coordinates to be used by the 2D array in main.</p>
  
  <p>Please tell me if I am being confusing or I am not making sense and I'll try and explain better.</p>
  
  <p>If there is no way to do it this way, just tell me.
  JimiiBee</p>