Max and Min values of datatype char

To find out the minimum and maximum values of a char we can use the static variables MIN_VALUE and MAX_VALUE of the Character class.
If we would output the min and max characters themselves it wouldn’t be very readable. Therefore we cast the value to an int to display the decimal values instead.

The code above will output this when executed:

Search for more Java info on this site here:
Custom Search

Please type any questions here.