ComProg2 Lesson 1 - Introduction To Programming (Review)
ComProg2 Lesson 1 - Introduction To Programming (Review)
Why is it called Java? It is customary for the creator of a programming language to name the
language anything he/she chooses. The original name of this language was Oak, until it was
discovered that a programming language already existed that was named Oak. As the story
goes, after many hours of trying to come up with a new name, the development team went out
for coffee and the name Java was born.
II. Terminologies:
a. Computer Program – a sequence of statements intended to accomplish a task.
b. Programming – process of planning and creating a program.
c. Programming Language – set of rules, symbols, and special words used to construct
programs.
d. Class – used to create Java programs. It is used to group a set of related operations.
e. Method – a Java mechanism where operations in a program is implemented.
f. Identifier – names of things, such as variables, constants and methods, that appear in
programs.
g. Variable– memory cells whose contents can be modified during program execution.
h. Declaration – declare things such as variable; naming and identifying the data type of a
variable.
i. Initialization – placing for the first time the value of a variable.
j. Debugging – removing the errors in a program.
k. Reserved Wordsare names that cannot be used for anything other than their intended
use. (Example:int, double, char, boolean etc.)
l. Method – a Java mechanism where operations in a program is implemented. Used to
divide complicated programs into manageable pieces.
m. Unified Modeling Language (UML)–a graphical representation of a class and its
members.
n. Parameters – used to provide information to a subroutine when that subroutine is
called.
o. Predefined Methods – methods that are readily available in Java.
p. User-defined Methods – methods that are created by a programmer.
q. Value-returning methods – methods that have a return data type. These methods return
a value of a specific data type using the return statement.
r. Void methods – methods that do not have return type. These methods do not use a
return statement to return a value.
s. Method overloading – several methods with the same name within a class but must
have different formal parameter list.
t. Array– a collection (sequence) of a fixed number of variables called elements or
components wherein all elements are of the same data type.
u. Index – specifies the position of an element in an array.
v. Base address—the address (memory location) of the first array element.
w. Array subscripting operator– represented by [] symbol. Used in array to access a specific
element coupled with an index.
x. Out of Bounds – if the index used is greater than array size minus 1 (size - 1).
b. byte (8 bits)
c. short (16 bits)
d. int (32 bits)
e. long (64 bits)
f. boolean (true or false)
g. float (6 or 7 decimal points)
h. double (15 decimal points)