So I am VERY new to Java., but I actually really like it so far. I am comfortable in C++ and was trying to convert some of my code to learn more. I am stuck in translating my code at size_t
. I know there are no unsigned integer types in Java, but could I use long
instead? Would I just have to watch out for the case of negatives?
Thank for the insight!
Java doesn't have unsigned types. But long
in Java is 64-bit so it is definitely enough to be a size_t
.
And, yes, for a bug free system, you can always watch out the unexpected case of negatives.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With