File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Head First Android this week in the Android forum!
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]
It is sorta covered in the JavaRanch Style Guide.
subject: return value
It's not a secret anymore!