java - Strange multiplication error -


why simple this:

system.out.println("test problem: " + 194*194*194*409); 

output this:

test problem: -1308701240 

because you've overflowed integer. see limits on numbers handled integers in java documentation.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -