Could you please explain ,what is the need of this line?


             Scanner abhi = new Scanner(System.in);


if we are already writing 2 different lines for the input in fnum and snum.

              System.out.println("Enter 2 numbers: ");
               fnum = abhi.nextDouble();
               snum = abhi.nextDouble();