Skip to Main Content

Disabling inherited method on derived class

2875841Mar 8 2016 — edited Mar 11 2016

I have a superclass

Class A{

method1();

method2();

method3();

}

class B extends A{

//dont need method 1 here;

}

class C extends A{

//all method here

}

class D extends A{

//all method here

}

so how can i exclude method1() from B because its common to C and D.Is there any way to do this in java

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Apr 8 2016
Added on Mar 8 2016
10 comments
1,965 views