Min and Max values of datatype double

The class ‘Doubler’ is a wrapper class for the datatype double, and it has two static variables that contains the minimum and maximum values of the double datatype: MIN_VALUE and MAX_VALUE.
To find out the min and max values of the double datatype, just print them out to console like this:

Continue reading

Min and Max values of datatype float

The class ‘Float’ is a wrapper class for the datatype float, and it has two static variables that contains the minimum and maximum values of the float datatype: MIN_VALUE and MAX_VALUE.
You can print out the min and max values of the float datatype by specifying these variables as arguments to System.out.

Continue reading

Min and Max values of datatype long

The class ‘Long’ is a wrapper class for the datatype long, and it has two static variables that contains the minimum and maximum values of the long datatype: MIN_VALUE and MAX_VALUE.
To find out the min and max values of the long datatype, you can print out the values like below:

Continue reading

Min and Max values of datatype int

The class ‘Integer’ is a wrapper class for the datatype int, and it has two static variables that contains the minimum and maximum values of the int datatype: MIN_VALUE and MAX_VALUE.
To find out the min and max values of the int datatype, just print them out to console like this:

Continue reading

Min and Max values of datatype short

The wrapper class for the datatype short has two static variables for getting the minimum and maximum values that a variable of type short can have, MIN_VALUE and MAX_VALUE.
The code example below prints them out and below the code snippet you can see the min and max values.

Continue reading

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.

Continue reading