In Java, suppose we have a function with the parameter double a. Does it work if I pass an integer as argument? (I mean, is there an implicit conversion?) And i
Because you can set a double to an integer, then integer as argument is ok to function with double as parameter. Other way round fails. In that case you need to cast the double to an int. Same applies to normal assignents eg..
int i = 6;
double d = 0;
d = i; /* ok
i = d ; /* not ok