Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes return value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "return value " Watch "return value " New topic

return value

kan ashok

Joined: Feb 28, 2004
Posts: 8
public a.b.c.Hai getvalue()
return (a.b.c.Hai)anotherobject.getResult(this, "oye");
i want to print value of what getValue() returns. How can i print that value ?
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
It would depend a bit on the implementation of your class, including the toString() method. Perhaps something like the following is what you're trying to figure out.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: return value
Similar Threads
Calling an object's get functions multiple times in same code segement? Bad Practice?
OOP - Inheritance Question
Help please, using a JSpinner but I can't get the user's input into a date object
abstract class
Class Help!