November 12, 20169 yr 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.
November 12, 20169 yr Your value could overflowing, int can only store values up to 2^31 or 2,147,483,648. Show all involve variable declarations please.
November 12, 20169 yr 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
November 12, 20169 yr That's not something you want to fix... I wish my profit would exceed 31 bits Could overflow for other reasons.
November 12, 20169 yr 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);
Create an account or sign in to comment