My example shows i try to add some extra method to Runnable
anonymous class, in general how can i call extra method which i create.
Runnable myRunnable = new Runnable()
{
public void run()
{
System.out.println("Running");
}
// any extra method to explain the question
public void a()
{
System.out.println("A");
}
};
myRunnable.run();
myRunnable.a(); // is this right??