how to read a long value from standard input in java? -


i using util.scanner read input user. don't understand how read long datatype value.

scanner scr=new scanner(system.in); long l=scr.nextint(); 

i unable read 64-bit data using above code — gives me input mismatch exception.

use nextlong method :

long l=scr.nextlong(); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -