Check out example codes for "long input in JAVA". It will help you in understanding the concepts better.

Code Example 1

Scanner scr=new Scanner(System.in);
long l=scr.nextInt();

Learn ReactJs, React Native from akashmittal.com