Class Simple

  extended by com.perisic.shadow.example.mains.Simple

public class Simple
extends java.lang.Object

This example does not uses shadows. It serves as a starting point for the following examples. The course of action is as follows:

  1. Two objects (fabian, tomislav) are instantiated.
  2. Fabian smiles.
  3. Fabian tells Tomislav a joke making him smile.
Note that all methods are called via the call.(...) Syntax. Basically, arg2, ...) is equivalent of"bar", arg1, arg2, ...). The latter form is neccessary to enable shadowing.
public class Simple{

 public static void main(String [] args) {
       NiceFellow fabian = new NiceFellow("Fabian");
       NiceChild tomislav = new NiceChild("Tomislav");"smile",1);"printMood");"printMood");

       System.out.println("");"tellJokeTo", tomislav );


Constructor Summary
Method Summary
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Simple()
Method Detail


public static void main(java.lang.String[] args)