Automatic type conversion is possible in Java when source type and destination types are compatible to each other and when size of destination type is bigger than size of source type. For example, an int value can automatically assign to long variable. However an automatic conversion is impossible for a double value to byte variable.
However, when automatic type conversion is not possible then you could do it by explicit type conversion using cast.
For Example: To convert double to byte:
b = (byte) d;