• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

What's the return type !

Hi

Now that I know void doesn't return anything what about this code.

What's the return type in this code?
public boolean rentHouse(String address, double weeklyRent, House rentedHouse)

Open in new window

0
bt1942
Asked:
bt1942
  • 4
  • 2
1 Solution
 
Kevin CrossChief Technology OfficerCommented:
Refer to this again: http://java.sun.com/docs/books/tutorial/java/javaOO/methods.html

You tell me what the return datatype is.  Since you understand void from last question, should be able to pick it out from above.
0
 
Kevin CrossChief Technology OfficerCommented:
{not trying to be funny by the way, trying to ensure you learn the concept of where and what the return type is in a method signature so you will be able to recognize when someone changes method signature on you}
0
 
bt1942Author Commented:
mwvisa1 // hi, is it boolean?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Kevin CrossChief Technology OfficerCommented:
yes. exactly right.

modifier returntype methodname(parameters, ...) {
    // code
}

0
 
bt1942Author Commented:
Thanks for the comment!
0
 
Kevin CrossChief Technology OfficerCommented:
No problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now