// JSP file
Calling a Private Method
Calling a Private Method
The message is:
Now the message is:
///////////////////////////////////////
//Java Source Code
package beans;
import java.io.Serializable;
public class Message implements Serializable
{
private String message = "Hello from JSP!";
public void setMessage(String m)
{
this.message = m;
}
public String getMessage()
{
return privateMessage();
}
private String privateMessage()
{
return this.message;
}
public Message()
{
}
}
CallAPrivateMethod.zip( 89 k)