Question on instructions for Java

  • Java
  • Thread starter camel-man
  • Start date
  • Tags
    Java
In summary, the conversation is discussing a procedure for handling a "Create" event, potentially for a form object. The task involves adding three instances of an animal class to a list, although the specifics of the form and list are unclear. A handler for the Create event must be written and the animal class may need to be defined.
  • #1
camel-man
76
0
Can someone tell me what they think this is referring to?

On the create event for a form add 3 animal instances to a list.

A form just meaning a GUI? and what does it mean on the create event? Clicking something to add the animals perhaps?
 
Technology news on Phys.org
  • #2
The information you're providing is pretty sketchy but ...
Apparently there is a procedure for handling a "Create" event - perhaps a "Create Form" event. In that procedures a form object is created. Apparently there is an animal class and a list that can hold animal object or pointers to animal objects. It isn't specified whether the Form includes this list or if the lists exists elsewhere. If the list doesn't already exist, them perhaps you're suppose to add it to either the forum class or to the class of the object that is handling the event.
 
  • #3
camel-man, there's a lot here that is not clear, such as exactly what a "form" is (i.e., exactly which Java class).

"on the create event for a form" - you need to write a handler for the Create event. When that event is fired, your event handler begins executing

"add 3 animal instances" - you are either given a definition for the animal class, or you have to write it yourself. Either way, in the body of your event handler for the create event, add three instances of the animal class to whatever list you need to be working with.

Hope that helps, but your problem description is pretty vague.
 

FAQ: Question on instructions for Java

1. What is Java?

Java is a high-level programming language developed by Sun Microsystems. It is commonly used for developing web and mobile applications, as well as enterprise software.

2. How do I install Java?

The installation process for Java varies depending on your operating system. You can download and install the latest version of Java from the official website, and follow the instructions provided. Make sure to also check for any system requirements before installing.

3. What is the difference between JDK and JRE?

JDK (Java Development Kit) is a software development kit that includes tools for developing and debugging Java applications. JRE (Java Runtime Environment) is a software package that allows you to run Java applications on your computer. In simpler terms, JDK is used for creating Java applications, while JRE is used for running them.

4. How do I write my first Java program?

To write your first Java program, you will need a text editor and a Java compiler. The program should be saved with a .java extension, and then compiled using the javac command. After successful compilation, you can run the program using the java command.

5. Can I use Java to create mobile apps?

Yes, you can use Java to create mobile applications for Android devices. Android Studio, the official Android development environment, uses Java as its main programming language. However, for iOS development, you will need to use a different programming language such as Swift.

Similar threads

Replies
1
Views
1K
Replies
4
Views
2K
Replies
4
Views
4K
Replies
12
Views
1K
Replies
10
Views
2K
Replies
2
Views
2K
Replies
8
Views
11K
Replies
18
Views
8K
Back
Top