double to boolean Java

double to boolean Java

double to boolean: The data type boolean is incompatible for converting into any other data type. That is, a boolean value cannot be converted (or assigned to) into any other data type like char, int, double, short etc. The maximum permitted is one boolean can be assigned to another boolean.

Following are not permitted.

Let us see what compiler says about double to boolean casting.

double to boolean
Compiler error screenshot of double to boolean Java

Following is permitted (boolean assignment).

The keyword boolean is used in comparison operations.

Pass your comments and suggestions of how far this is helpful to you and also for the improvement of this tutorial "double to boolean"

View all for 65 types of Conversions

Leave a Reply

Your email address will not be published. Required fields are marked *