[JAVA rookie] ask questions about input that can't be turned off.

The

code is as follows:

import java.util.Scanner;

import com.sun.jmx.snmp.SnmpUnknownSubSystemException;

public class ForProject {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print(":");
        int num = input.nextInt();
        System.out.println(":");
        for(int i=0 ;i <= num; iPP){
            System.out.println(i +"\t"+ "+"+"\t"+ (num - i) +"\t" + "="+ "\t" + num );
        }
        
    }
    
}

the running result is no problem. The problem is that the eclipse always shows a yellow icon, and warns that: input is never closed
has looked it up on the Internet, saying that input has been consuming memory because it has not been closed.
the problem is that after adding close to the code, pop-up The method close () is undefined for the type Input
I want to ask what this is all about

. The

code is as follows:

import java.util.Scanner;

import com.sun.corba.se.spi.orbutil.fsm.Input;
import com.sun.jmx.snmp.SnmpUnknownSubSystemException;

public class ForProject {
    public static void main(String[] args) {
        try{
            Scanner input = new Scanner(System.in);
            System.out.print(":");
            int num = input.nextInt();
            System.out.println(":");
            for(int i=0 ;i <= num; iPP){
                System.out.println(i +"\t"+ "+"+"\t"+ (num - i) +"\t" + "="+ "\t" + num );
            }
        }finally{
            Input.close();
        }
    }
    
}

prompt:

clipboard.png

Apr.01,2021

    public static void main(String[] args) {
            Scanner input = null;
            try{
                 input = new Scanner(System.in);
                 System.out.print(":");
                 int num = input.nextInt();
                 System.out.println(":");
                 for(int i=0 ;i <= num; iPP){
                     System.out.println(i +"\t"+ "+"+"\t"+ (num - i) +"\t" + "="+ "\t" + num );
                 }
            }finally{
                if(null != input){
                    input.close();
                }
            }
    }

package com.justTest;

import java.util.Scanner;


public class ForProject {
    public static void main(String[] args) {
        Scanner input = null;
        try {
            input = new Scanner(System.in);

            System.out.print(":");
            int num = input.nextInt();
            System.out.println(":");
            for (int i = 0; i <= num; iPP) {
                System.out.println(i + "\t" + "+" + "\t" + (num - i) + "\t" + "=" + "\t" + num);
            }
        }finally {
            input.close();
        }

    }

}

when you remove the import com.sun.corba.se.spi.orbutil.fsm.Input;
code completion function, pay attention to which class you are using

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bdf1-2c2ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bdf1-2c2ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?