Input in java doubt

do we always have to write

scanner scn=new Scanner(System.in);

every time to take input in single program or only one time.
like

    Scanner scn = new Scanner(System.in);
    int n=scn.nextInt();
    Scanner sc = new Scanner(System.in);
	int a=sc.nextInt();

if only one time then why?

Scanner is a class that is used in receiving input from the console. So it’s sufficient to instantiate it just once at the beginning of the program. But even if you write it multiple times, it won’t be wrong if you use different names for all of them like scn, scn1