I have written a simple program like below which is confusing me:

```
    package BasePackage;

public class ParentClass {
    static int i=15;
    double f=4.5;   

    public static void main(String[] args) {

        ParentClass obj1= new ParentClass();
        obj1.i=10;
        obj1.printvalue();
        System.out.println("The value of i is " +i);

    }
    public void printvalue()
    {
        ParentClass obj1= new ParentClass();
        int i =30;
        obj1.i=25;
        System.out.println("The value of i in the method is " +i);
    }

}

```

I am getting an output like The value of i in the method is 30 and the value of i is 25. My question is the static value of i at class level i.e 15 should be printed as the static value should not be changed. Also i am changing the value of i =25 in the method, so why is it not getting printed instead of 30?