class base
{
public void superMethod()
{
System.out.println("Hello i m a super class method");
}
}
class der extends base
{
super.superMethod();// error identifier expected
}
i need to call a base class method without overloading it into derive class please provide me solution for it
You don’t have to do anything apart from calling the method. You do need to be inside a instance method, constructor or a instance initializer block to do that though. You only need the super keyword if you have to make a distinction when you are overriding the method.