Multiple choice technology programming languages

class A  {
    int x=10;
    public static void show()    {
        int x=20;
        System.out.println(x);
    }
}

The Output we always get is-- 20,, But Why... What is the name of this concept??

  1. Data Hiding

  2. Data Shadowing

  3. Data Obscuring

  4. None of the Above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When a local variable within a block or method has the same name as a member variable in the surrounding class scope, the local variable shadows the class variable. This compiler concept is known as variable or data shadowing.