class A
{
int add()
{}
}

class B extends A
{
int add()
{}
}
class C extends B
{
i want to call here A's class method add using

A a=(A)this;
t.add(); it is possible or not
}
class D
{
C c=new C();
}

Nope.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.