Science, Tech, Math › Computer Science Definition for the Java Term: Parameter Share Flipboard Email Print karimhesham / Getty Images Computer Science Java Programming PHP Programming Perl Python Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Paul Leahy Paul Leahy Computer Science Expert M.A., Advanced Information Systems, University of Glasgow Paul Leahy is a computer programmer with over a decade of experience working in the IT industry, as both an in-house and vendor-based developer. Learn about our Editorial Process Updated on September 28, 2017 Parameters are the variables that are listed as part of a method declaration. Each parameter must have a unique name and a defined data type. Parameter Example Within a method to compute a change to a Circle object's position, the method changeCircle accepts three parameters: a name of a Circle object, an integer representing a change to the X-axis of the object and an integer representing a change to the Y axis of the object. public void changeCircle(Circle c1, int chgX, int chgY) { c1.setX(circle.getX() + chgX); c1.setY(circle.getY() + chgY); } When the method is called using example values (e.g., changeCircle(Circ1, 20, 25)), the program will move the Circ1 object up 20 units and right 25 units. About Parameters A parameter may be of any declared data type -- either primitives like integers, or reference objects including arrays. If a parameter may become an array of an indeterminant number of data points, create a vararg by following the parameter type with three periods (an ellipsis) and then specifying the parameter name. Cite this Article Format mla apa chicago Your Citation Leahy, Paul. "Definition for the Java Term: Parameter." ThoughtCo, Aug. 27, 2020, thoughtco.com/parameter-2034268. Leahy, Paul. (2020, August 27). Definition for the Java Term: Parameter. Retrieved from https://www.thoughtco.com/parameter-2034268 Leahy, Paul. "Definition for the Java Term: Parameter." ThoughtCo. https://www.thoughtco.com/parameter-2034268 (accessed March 23, 2023). copy citation Featured Video