Hello,
For java interface, In one class I have the following code
public class ObjectA
{
public void SampleA()
{
//do something 1
}
public void SampleB((int aPosition)
{
// user enter some value
}
}
I have another class which is not related to the other class, only interested in the message. I know how to send SampleA message to object reference Piggy. What I don't know is how do I send SampleB message to same object reference Piggy. Message is from a user when he/she enters a value.
public class ObjectA
{
// Instance variable
private Pig Piggy;
public void ExampleA()
{
Piggy.SampleA(); // the SampleA sends a message to the
// object reference Piggy
}
}