Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Number of parameters

Posted on 2008-10-09
3
Medium Priority
?
199 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 index, 1 parameter?

and what about the return type? getStudent?

Thanks.
public Student getStudent(int index)

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
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
manuel_m earned 2000 total points
ID: 22676189
Correct. It would be 1 parameter of type int and the parameter name index.

The return type is an object of type Student.

getStudent is a method that you call.
0
 

Author Closing Comment

by:bt1942
ID: 31504561
Thanks for the help!
0
 
LVL 6

Expert Comment

by:manuel_m
ID: 22676236
The method is declared "public". That means that all other classes, regardless of the package they belong to, can access the method.

Student: This is a class that seems to be in your project as a class file or in a jar-file that you have downloaded or something else.

getStudent(int index): this is the method name. get-methods (should) always declare a method that gives you an object or a value back, such as an int or a String value.
The method has a parameter value of type int. Because I don't know what this method does I just guess that the method searches in an array or Collection for the object at the specified index given by the parameter. Maybe it is a select statement to a table in a database.
Anyway it returns an object of type Student that should be found with the help of the parameter index.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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