Inheritance/Single: Difference between revisions
Content deleted Content added
m →{{header|Tcl}}: add version requirements |
|||
Line 123:
{
// ...
}</lang>
=={{header|Groovy}}==
<lang groovy>class Animal{
//functions go here...
}</lang>
<lang groovy>class Dog extends Animal{
//functions go here...
}</lang>
<lang groovy>class Cat extends Animal{
//functions go here...
}</lang>
<lang groovy>class Lab extends Dog{
//functions go here...
}</lang>
<lang groovy>class Collie extends Dog{
//functions go here...
}</lang>
|