How the value of int stores in byte; byte b=10;

sir as you say larger bucket does not store in smaller bucket. so how the value of int stores in byte. byte b=10; here byte = 8 bits and int =32 bits

Sumit those value of int which can be in the range of byte are allowed to be stored as a byte. Int values outside the byte’s range will give an error