PlagueDoctor Posted November 12, 2016 Share Posted November 12, 2016 Why is my code outputting this? Recently switched from eclipse to intelliJ, it was fine before i switched, haven't changed anything.. how do i fix it? Heres the code. Quote Link to comment Share on other sites More sharing options...
Fishing Posted November 12, 2016 Share Posted November 12, 2016 come in to the cb and msg me Quote Link to comment Share on other sites More sharing options...
Botre Posted November 12, 2016 Share Posted November 12, 2016 Your value could overflowing, int can only store values up to 2^31 or 2,147,483,648. Show all involve variable declarations please. Quote Link to comment Share on other sites More sharing options...
Token Posted November 12, 2016 Share Posted November 12, 2016 Your value could overflowing, int can only store values up to 2^31 or 2,147,483,648. Show all involve variable declarations please. That's not something you want to fix... I wish my profit would exceed 31 bits 3 Quote Link to comment Share on other sites More sharing options...
Botre Posted November 12, 2016 Share Posted November 12, 2016 That's not something you want to fix... I wish my profit would exceed 31 bits Could overflow for other reasons. Quote Link to comment Share on other sites More sharing options...
Hzkane Posted November 12, 2016 Share Posted November 12, 2016 You need to show us all the variables in your calculations, but personally I would do this instead of how you are calculating time ran. long timeRan = System.currentTimeMillis() - startTime; so this way when you're calculating profit/hr you don't have to have long unnecessary code. You can just do something along the lines of int profitPerHr = (int) (profit * 3600000d / timeRan); 1 Quote Link to comment Share on other sites More sharing options...