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?