Q:

modify a method from an extended class

So i have a class file that extends java.lang.object called powerfulS
And i use this class file in my Testers.java as such
import java.lang.object;

public class Testers
{

 public static powerfulS=new powerfuls(..); 

 [..]

}

now i have a dilemma in which my class powerfulS has a method which needs to be modified. And the method in this class uses other methods within that class
    e.g
public double method1()
{

 return getPowerLvl()*getSystemCrasher();

}

i want to change it so that it uses another method in that class as such
e.g
public double method1()
{

 return getPowerLvl()*getSystemReviver();

}

When i attempted to do this
public class Testers
{

 public double method1()
{

 return super.getPowerLvl()*super.getSystemCrasher();

} 

 public static powerfulS=new powerfuls(..); 

 [..]

}

I get a 'cannot find symbol error'.... How do I modify the method in the imported class? Do I use @Override ?

A:

The keyword super applies to Parent class, so in your case you are trying to call the method of Object class which doesn't exist. 

public class Testers
{

 public double method1()
{

 //You are calling super.getPowerLv1() * super.getSystemCrasher()
 //return super.getPowerLvl()*super.getSystemCrasher();
 // remove the super keyword like and call method from powerfuls getPowerLv1() and getSystemCrasher
 return powerfulS.getPowerLvl()* powerfulS.getSystemCrasher();

} 

 public static powerfulS=new powerfuls({
    public double method1()
      {
           //here you can ovverride this method how you will like
        return super.getPowerLvl()*super.getSystemCrasher() + 1 + 1;

      }
 }); 

 [..]

}

