Solved

What's the return type !

Posted on 2008-10-09
6
156 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jboss 7.1 start up error 1 83
ejb mdb examples 1 39
Setup GlassFish 4 55
batch vs regular insert in spring DAO 2 51
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

739 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