Shadowing occurs when a name is redefined in a place where there is already an active definition of that name. For example, x might be redefined at a place where x is in scope. It can also happen where you define local variable insert where there is already something called insert defined outside.
Java disallows shadowing. Here is an example from C.
int sumsq(int n) { int sum = 0; for(int i = 0; i < n; i++) { int n = i*i; sum += n; } return sum; }Obviously, that is not a recommended way to do things, but it is allowed.