What's the return type !

Posted on 2008-10-09
Last Modified: 2013-11-23

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

Question by:bt1942
  • 4
  • 2
LVL 59

Expert Comment

by:Kevin Cross
ID: 22683443
Refer to this again:

You tell me what the return datatype is.  Since you understand void from last question, should be able to pick it out from above.
LVL 59

Expert Comment

by:Kevin Cross
ID: 22683450
{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}

Author Comment

ID: 22683491
mwvisa1 // hi, is it boolean?
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.

LVL 59

Accepted Solution

Kevin Cross earned 500 total points
ID: 22683508
yes. exactly right.

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


Author Closing Comment

ID: 31504885
Thanks for the comment!
LVL 59

Expert Comment

by:Kevin Cross
ID: 22683543
No problem.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 82
hibernate example for saving data 19 55
hashmap order 17 37
Java Eclipse Loop 3 21
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question