Solved

What's the return type !

Posted on 2008-10-09
6
155 Views
Last Modified: 2013-11-23
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
Comment
Question by:bt1942
  • 4
  • 2
6 Comments
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22683443
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
 
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}
0
 

Author Comment

by:bt1942
ID: 22683491
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.

 
LVL 59

Accepted Solution

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

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

0
 

Author Closing Comment

by:bt1942
ID: 31504885
Thanks for the comment!
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22683543
No problem.
0

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