निम्नलिखित कोड में ग्रहण मुझे वार्मिंग "संसाधन रिसाव: 'को' कभी बंद नहीं होता" क्यों देता है?
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();
Scannerचेतावनी को बंद और चुप कर देगा, लेकिन यह भी बंद हो जाएगाSystem.inजो आमतौर पर वांछनीय नहीं है।