I have a column in a MySQL table calleddead_heat_flag
which data type is smallint
,
and I want to represent this column as one attribute in my Java class.
What data type should I use?
As per the comment below, for MySQL's smallint, java's short
should cover that value range. Of course, you could also use an int
, but keep in mind that it allows many values that the database column does not.
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