Yeah, you can't simply cast an int to an enum, because they are too different. It's like trying to cast an apple to an orange - you can't.
However there is a way to convert (not cast) an int to a Fruit:
The "ordinal" is the int associated with an enum value's position in the list of values. It starts at 0, not 1 (despite the fact that this contradicts conventional mathematical definitions of the
word "ordinal"). You can look up the ordinal for a given Fruit using the ordinal() method - so
will print 0.