为什么Eclipse会让我变暖"资源泄漏:'in'永远不会关闭"以下代码?
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();
Run Code Online (Sandbox Code Playgroud)