JSP: Surcharge de méthodes en jsp

Author:
 
<HTML>
    <HEAD>
        <TITLE>Exemple de surchage des méthodes</TITLE>
    </HEAD>
 
    <BODY>
        <H1>Overloading Methods</H1>
 
        <%!
            javax.servlet.jsp.JspWriter localOut;
 
            void printText() throws java.io.IOException
            {
                localOut.println("Hello!<BR>");
            }
 
            void printText(String s) throws java.io.IOException
            {
                localOut.println(s + "<BR>");
            }
        %>     
        <%
        localOut = out;     
 
        printText();
        printText("Bienvenu sur JSP!");
        %>
    </BODY>
</HTML>
           
       

Cet article JSP: Surcharge de méthodes en jsp est apparu en premier sur .