package test;
import java.util.*;
public class six_thirteen {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.println("请输入你的年龄:");
int age = reader.nextInt();
System.out.println(age);
}}
请问一下大神现在有一个警告Resource leak: 'reader' is never closed,是什么原因?应该怎么改?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1978/viewspace-3125074/ ,如需转载,请注明出处,否则将追究法律责任。