Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

One more question of Number of parameters

Posted on 2008-10-09
6
Medium Priority
?
207 Views
Last Modified: 2013-11-23
Hi

As you can see the code, if the question asks you to write down the numbers of parameters and return type.

The answer would be

Number of parameters: 2 (String & double)
Return type: rentHouse ? (I'm not sure)

Thanks.

Thanks.
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 6

Accepted Solution

by:
manuel_m earned 2000 total points
ID: 22676249
Ok, same here.

Count the number of parameters.
address of type String
weeklyRent of type double
and rentedHouse obviously of type House.

so we have 3 parameters.

The return type here is between the public modifier and the method name rentHouse.
0
 

Author Comment

by:bt1942
ID: 22676273
manuel_m // Ok I see, so the return type is boolean?
0
 

Author Comment

by:bt1942
ID: 22676279
manuel_m // Oh ok my mistake.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:bt1942
ID: 22676285
manuel_m // if they are same like (int day, int month, int year) do you count this as 1 or 3?
0
 

Author Closing Comment

by:bt1942
ID: 31504566
Thanks for the comment.
0
 
LVL 6

Expert Comment

by:manuel_m
ID: 22676310
> if they are same like (int day, int month, int year) do you count this as 1 or 3?

The count is 3 !

You always have to count all the parameters given in a method. It doesn't matter what type they are :-)
0

Featured Post

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!

Question has a verified solution.

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

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

598 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