1. Home
  2. Computing & Technology
  3. Java

Implicit Parameter

By , About.com Guide

Definition:

When calling a method of an object it's common to pass a value to the method. For example, if the object Employee has a method called setJobTitle:

Employee dave = new Employee();
dave.setJobTitle("Candlestick Maker");

the String "Candlestick Maker" is an explicit parameter being passed to the setJobTitle method. However, there is another parameter in the method call that is known as the implicit parameter. The implicit parameter is the object the method belongs to. In the above example it's dave, the object of type employee.

Implicit parameters are not defined within a method declaration because they are implied by the class the method is in:

public class Employee {

  public void setJobTitle(String jobTitle)
  {
    this.jobTitle = jobTitle;
  }
}

In order to call the setJobTitle method there must be an object of type Employee.

Glossary:

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Explore Java
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Java
  4. Java Glossary
  5. I
  6. Definition for the Term: Implicit Parameter>

©2009 About.com, a part of The New York Times Company.

All rights reserved.