Hello guys, I was just reading a bit about automatic promotion and casting in java. From what I have noticed, automatic promotion is always done implicitly by java compiler. So we won't see something like:
int num1 = 10;
double num2 = (double) num1;
While casting can be done implicitly or explicitly. I'm confuse here, what does this mean? I read that we can either change data type from a "bigger" data type to a smaller one or vice-versa. When do we need to explicitly mention the data type and why please