alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Groovy example source code file (visit.groovy)

This example Groovy source code file (visit.groovy) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

animal, animal, example, example, here, here, servlet, there, there, visiting, where

The Groovy visit.groovy source code

Animal shark = new zoo.fish.Shark()
Animal trout = new zoo.fish.Trout()
Animal forelle = new zoo.HommingbergerGepardenforelle()

println """
<html>
    <head>
        <title>Groovy Servlet Example - Visiting the zoo
    </head>
    <body>
     <p>Shark
${shark.saySomething("\"Where is the trout?\"")} <p>Trout
${trout.saySomething("Here is the trout!")} <p>Forelle
${forelle.saySomething("\"<a href=\"http://www.hommingberger-forelle.de\">There is no spoon.\"")} </body> </html> """

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy visit.groovy source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.