Source of ParametersDemo.java


  1: 
  2: public class ParametersDemo
  3: {
  4:     public static void main(String[] args)
  5:     {
  6:         DemoSpecies s1 = new DemoSpecies( ), 
  7:                     s2 = new DemoSpecies( );
  8:         s1.set("Klingon Ox", 10, 15);
  9:         s2.set("Ferengie Fur Ball", 90, 56);
 10:         System.out.println("Value of s2 before call to method:");
 11:         s2.writeOutput( );
 12:         s1.makeEqual(s2);
 13:         System.out.println("Value of s2 after call to method:");
 14:         s2.writeOutput( );
 15:         int aPopulation = 42;
 16:         System.out.println(
 17:                       "Value of aPopulation before call to method: "
 18:                      + aPopulation);
 19:         s1.tryToMakeEqual(aPopulation);
 20:         System.out.println(
 21:                       "Value of aPopulation after call to method: "
 22:                      + aPopulation);
 23:     }
 24: }