title: How to call a method that doesn't return anything?
body: <p>I'm trying to call this method that enters a coordinate point from user input.</p>
  
  <pre><code>public class Cases {
  
  public static Result Case1(){
      Scanner in = new Scanner(System.in);
      System.out.println("Enter index: ");
      int i = in.nextInt(); //validate
      System.out.print("Enter integers x, y to replace: ");
      int x = in.nextInt();
      int y = in.nextInt();
      A[i] = new Point(x, y);
  
      if(occupancy&lt;i)
          occupancy=i;
      }
  }
  </code></pre>
  
  <p>but I don't know how to make it work since it doesn't need a return statement.</p>
  
  <p>This is how I called it from my main method:</p>
  
  <pre><code>Result r = null;
  r = Cases.Case1();
  </code></pre>
  
  <p>I want all of my cases from a switch statement into this separate method, but I can't even get one of them to work. What am I missing?</p>