at the compile time it gives the error like
"attempting to use the incompatible return type"
"attempting to use the incompatible return type"
int x = getValue(val);
//some code....
public List getValue(int val){
//some code...
}
Comment