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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -