This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Some queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Some queries" Watch "Some queries" New topic

Some queries

Steven Leow

Joined: Jun 19, 2001
Posts: 6
I have 2 pieces of code.
1st one : which contains some codes :
... ...
Other o = srv.getOther();
ClientOther co = new ClientOtherImpl();
srv.processServer(co, "Testing");
... ...
2nd one : which has this method
... ...
public void processServer(ClientOther co, String a)
... ...
What is happening here? I mean the process of creating an object called co in and passing it to the processServer method in Pls advise.
rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
can you give the whole code so that we can understand better?

Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
Well, what's happening right there is that you are passing an instance of the client to the server. Now the server can make calls on public methods in the client, like co.getAddress() or whatever. If this is what you are wondering about, then perhaps an object orient programming tutorial might be helpful. Otherwise, a bit more code for us to examine and a more specific question might do it.
subject: Some queries
Similar Threads
My way for multi-client failed?
java programs in vi editor
How to realize multi-client ?
Reg. Applet Chat
What is the 'host" in the .getByName() method?