BFOIT - Introduction to Computer Programming

Appendix A (Jargon)

-   V   -


A variable, in a computer program, is a container used to hold values.  Variables have names, identifiers, and programming-language-dependent attributes. 

The first kind of variables discussed in these lessons are inputs.  Inputs, a.k.a. parameters, to Logo procedures and Java methods provide the power to describe a process (a set of steps) that does different things, depending on the argument(s) provided when the method or procedure is invoked.

All variables have an attribute called scope.  What this means is where in your program's source code the variable may be accessed.  As an example, inputs may only be referenced inside of the method/procedure they are defined in.

In Java, variables have a specific type attribute, e.g., int, boolean, a class identifier, etc...  What you can do with the variable depends upon this type. 

WikipediA has a comprehensive description of a variable in Computer Science.

Java is so particular about everything being of this type or that type that when there is NO type that makes sense, you must specify void as a data type.  Methods must have a specified type when they are defined; it is part of their header.  So, when a method is not going to return anything (it has NO type) the method is declared with void in its header where a valid type identifier would normally go.

Other jargon:  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

Back to HomePage

Public Domain Mark
This work (BFOIT: Introduction to Computer Programming, by Guy M. Haas),
identified by Berkeley Foundation for Opportunities in IT (BFOIT),
is free of known copyright restrictions.