tinkercad arduino simulator integers being outputted as larger numbers than they are?
Bug. No other explanation. Real hardware (Arduino Uno) prints 12000.

Even the debugger tells me that the value of that variable is 12000.



Outputs:

Number: 12222 
12000 
12222 something 


Most interestingly if you Serial.println() the number, it is outputted correctly. The bug must be in the constructor of the String object, as demonstrated by the "test" String. This bug also occurs on other data types, e.g. int.

If you only use direct Serial.print[ln] calls you should be able to workaround that bug.