Java problem-Whats the reason behind and what will be probable output -


1.)

long milli=24*60*60*1000; long micro=24*60*60*1000*1000; long result=micro/milli; 

the result should 1000 it's not.

please can tell me output , explain it?

2)

int i=0; for(a=0;a<=integer.max_val;a++) {     i++; }  s.o.p(i); 

normally went infine loop why because there max value should come out of loop. @ conditions executed sucessfully , excepted value. .....anyone can tell me vm... handing of nummbers in java

you need put l in there long-conversion

long micro=24*60*60*1000*1000l 

Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -