swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activity in java


From: Marcus G. Daniels
Subject: Re: Activity in java
Date: 24 Dec 1999 10:19:10 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "DR" == david ROBIN <address@hidden> writes:

DR> public static void main (String []args) {
DR> Globals.env.initSwarm ("TestActivities", "0.0", "address@hidden",args);
DR> testactivities test= new testactivities (Globals.env.globalZone);
DR> test.buildObjects (); 
DR> test.buildActions ();
DR> test.activateIn (null); 
DR> getActivity ().getSwarmActivity ().next (); 

DR> *** Error: The method "getActivity" does not denote a class method

"test.buildObjects ()", means "call the instance method buildObjects
on the instance test".  

In this context, "getActivity ()" means "call the static
method getActivity on the class testactivities".  It's a static method
you're calling because its caller `main' is a static method, i.e. one
that can be called on a class.  The data a static method can directly
modify are static fields (class data), not instance variables. 





                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]