is this possible in java or any other programming language
Posted
by drake
on Stack Overflow
See other posts from Stack Overflow
or by drake
Published on 2010-03-08T17:58:57Z
Indexed on
2010/03/08
18:36 UTC
Read the original article
Hit count: 334
public abstract class Master
{
public void printForAllMethodsInSubClass()
{
System.out.println ("Printing before subclass method executes");
}
}
public class Owner extends Master {
public void printSomething () {
System.out.println ("This printed from Owner");
}
public int returnSomeCals ()
{
return 5+5;
}
}
Without messing with methods of subclass...is it possible to execute printForAllMethodsInSubClass()
before the method of a subclass gets executed?
© Stack Overflow or respective owner