RVASUDEV wrote:
> [...]
> Want to initialize an array (or other data structure), either
> thru code, or by reading from a text file/properties file.
> Each element will contain the name of a program option to
> run, and the name of a corresponding Java method that implements
> that program option. Then I display the names of the options to the
> user and allow them to select 1 or more options to run. After they
> click a button to confirm, iterate thru the array and call each of the
> methods corresponding to the options selected, and display their output
> to the user.
It's class which is lowest code primitive in Java, not function. Let me
rewrite your question:
1. Is it possible to have one-method classes?
2. Can we have some pointers or identifiers of those classes (usually
name is enough, but can be Class or a class instance)?
3. Can we use classes/objects to run a set of methods?
Basically, a class with one method may be essentially equal to a method
without a class. In both cases it's easy to reference them.
-- Mike
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html