how to take long input in java using scanner code example Example: long input in JAVA Scanner scr=new Scanner(System.in); long l=scr.nextInt();