JSP: Utilisation d’une variable de la super classe en jsp

Author:
       

    
        Using Superclass Variables With Subclassed Objects
    

    
        

Using Superclass Variables With Subclassed Objects

        <%!             javax.servlet.jsp.JspWriter localOut;             class vehicle             {                 public void start() throws java.io.IOException                  {                     localOut.println("Starting...
");                 }             }             class aircraft extends vehicle             {                 public void fly() throws java.io.IOException                  {                     localOut.println("Flying...
");                 }             }             class plane extends aircraft             {                 public void fly() throws java.io.IOException                  {                     localOut.println("Flying...
");                 }             }         %>              <%             localOut = out;                  out.println();             out.println("Creating a plane object...
");             vehicle p = new plane();             p.start();         %>                         

A Voir sur le même Sujet:

  • exemple programme java
  • apprendre ajouter et recherche en java pdf

Leave a Reply

Your email address will not be published. Required fields are marked *