Solved

What's the return type !

Posted on 2008-10-09
6
157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 60

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 60

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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 60

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 60

Expert Comment

by:Kevin Cross
ID: 22683543
No problem.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

617 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