hi royale
A boolean cant suddenly become another primitive data type:
boolean hasDataType;
hasDataType is either true or false it cant just become an integer or a float
but casting is converting similar data types, like you can cast a float to an int and vice versa as they are both numbers.
can you explain more what you not getting?
maybe watch this video, i found it good and it cleared a lot up
https://www.youtube.com/watch?v=AzO5pYE3y5o