#I am new to java and I need help with creating objects and recalling them when needed.

1 messages ยท Page 1 of 1 (latest)

hushed flax
#

I can screenshare and any one who is willing to assist me can do so.

indigo cliffBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I can screenshare and any one who is willing to assist me can do so.

You can create objects in Java using the "new" keyword followed by the constructor of the class you want to instantiate. For example:

// Creating an object of type MyClass
MyClass obj = new MyClass();

To recall objects when needed, you can store them in variables and access their properties or methods using dot notation. For example:

// Storing a string property value from obj in a variable
String propertyValue = obj.getProperty();

// Calling a method from obj
obj.method();

If you need assistance with creating and recalling objects in Java, you can screenshare on the Java Q&A discord server and someone will be able to help guide you through the process. Remember to provide specific details about what you are trying to achieve so that others can offer more targeted assistance. Good luck with your Java programming journey!

warm charm
#

Please post specific questions here.

hushed flax
#

I am trying to make the Total Troops in the top left corner be the sum of the troops in those three ships but I have it set to a random number and I am instantiating two objects which is basically giving two different random numbers

#

I want to fix it, I might as well send you the code that affects it. Three different classes

hushed flax
warm charm
#

People need the required input to be able to help.