troubleshooting Question

Call one class method from another class Java

Avatar of oggiemc
oggiemcFlag for Ireland asked on
11 Comments1 Solution348 ViewsLast Modified:
Ok, very quick question here.. Suppose i want to call one class method from another class (2 classes are in the same package). is there any other way of doing this apart from creating an object of the class whose method i want to call??I have a client/server system..the client sends a string, the server echos it back, i then want to append this message to the clientGUI textarea. The message is sent to Client class however, if i want to call the method in the ClientGUI class, i would have to create a new object of that class, hence the old ClientGUI is gone. Any ideas?
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros