Methods with Multiple Parameters
Methods are one of the three modules which exist in Java. With methods task can be separated into self-contained units. Sometimes methods depend on more than one type of information to what it needs to within the program. This information is called parameters. Parameters are the values that are provided to let the method do its job. When more than one parameter is used they are on a list and separated by a comma within parentheses. Each parameter type and name in the method declarations is listed. When declaring the method the name should define what the method is. There must be one argument in the method for each parameter that is called. Though there must be a distinct parameter for each parameter set, a parameter can belong to more than one set of parameters. Java Application Example with Multiple Parameters
An example of would be an address book database. This application could be used to keep track business contacts, or friend’s numbers and addresses. The multiple parameters it would use could be the contact’s name, phone number, address and email address. An address book application could be used for either business or personnel used. It could be in a PDA or a cell phone application that would call up the required information when the module is called up. Another example of multiple parameters being used in an application could be keeping track of students. This too would be like the adder book database but it could be pulled on a student name calling the parameters or it could be on the class. The parameters would be student name, student identification number and year they are in. An application such as this could be used in a school or a daycare center to keep track of the students and their personal information.
Deitel, H.M., & Deitel, P.J. (2002). Java: How to program (6th ed.). Upper Saddle River, NJ: Pearson Education Lamb, H. (n.d.). Write high performance, java data access applications, part 1....
Please join StudyMode to read the full document