title: Resource leak: 'in' is never closed
body: <p>Why does Eclipse give me the warming "Resource leak: 'in' is never closed" in the following code?</p>
  
  <pre><code>public void readShapeData() {
          Scanner in = new Scanner(System.in);
          System.out.println("Enter the width of the Rectangle: ");
          width = in.nextDouble();
          System.out.println("Enter the height of the Rectangle: ");
          height = in.nextDouble();
  </code></pre>