小编use*_*995的帖子

资源泄漏:'in'永远不会关闭

为什么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)

java eclipse resources memory-leaks input

77
推荐指数
8
解决办法
28万
查看次数

标签 统计

eclipse ×1

input ×1

java ×1

memory-leaks ×1

resources ×1