COMP 308 Java for Programmers – FINAL EXAM TIPS
(possible final questions and answers) 2025 Athabasca
University
Correct 66
Incorrect 0
Your answers
1 of 66
Term
What is 'parameterized types/generics'? Explain how it eliminates the
need for downcasting
Give this one a go later!
, A class that the compiler A method that allows for
can automatically dynamic type checking at
customize to accept/fetch runtime, which increases
only particular types. It flexibility.
eliminates downcasting
because it has a set type.
A technique for converting A feature that allows classes to
primitive inherit properties from multiple
types into objects to utilize parents, enhancing code reuse.
object- oriented features.
Don't know?
2 of 66
Term
What is CGI programming and what is its major shortcoming?
Give this one a go later!
When assigning primitives you copy the contents from one place to
another, whereas when assigning one object to another you are really
assigning one reference to another
Gives greater flexibility in your programming because you can call
methods and perform actions at run time to determine the initial values
The primary idea of a client/server system is that you have a central
repository of information—some kind of data, usually in a database—that
you want to distribute on demand to some set of people or machines
, CGI (Common Gateway Interface) allows dynamic interaction
between users and a web page. It's major shortcoming is that it is
slow and makes certain tasks such as dynamic graphing difficult
Don't know?
3 of 66
Term
What is the function of the comma operator? (See TIJ page 140.)
Give this one a go later!
Separation of statements Combining multiple statements
to be evaluated into a single expression for
sequentially efficiency.
Creating a new variable that
The comma operator is
holds the result of the last
used to increment values
evaluated statement.
in a loop.
Don't know?
4 of 66
Term
How is break used within switch? (See TIJ page 151 to 152.)
, Give this one a go later!
When assigning primitives you copy the contents from one place to
another, whereas when assigning one object to another you are really
assigning one reference to another
the finalize method should work when the garbage collector calls it,
and only on the next garbage collector pass will it reclaim the objects
memory
boolean-exp ? value0 : value1
If the boolean evaluates to true, value0 is evaluated, and its result
becomes the value produced by the operator. If it evaluates to false,
value1 is evaluated.
the break causes execution to jump to the end of the
switch body ex)
switch (integral-selector) {
case integral-value1 : statement;
break; case integral-value2 :
statement; break;
Don't know?
5 of 66
Term
What are the bitwise operators? (See TIJ pages 111 to 112.)
Give this one a go later!
(possible final questions and answers) 2025 Athabasca
University
Correct 66
Incorrect 0
Your answers
1 of 66
Term
What is 'parameterized types/generics'? Explain how it eliminates the
need for downcasting
Give this one a go later!
, A class that the compiler A method that allows for
can automatically dynamic type checking at
customize to accept/fetch runtime, which increases
only particular types. It flexibility.
eliminates downcasting
because it has a set type.
A technique for converting A feature that allows classes to
primitive inherit properties from multiple
types into objects to utilize parents, enhancing code reuse.
object- oriented features.
Don't know?
2 of 66
Term
What is CGI programming and what is its major shortcoming?
Give this one a go later!
When assigning primitives you copy the contents from one place to
another, whereas when assigning one object to another you are really
assigning one reference to another
Gives greater flexibility in your programming because you can call
methods and perform actions at run time to determine the initial values
The primary idea of a client/server system is that you have a central
repository of information—some kind of data, usually in a database—that
you want to distribute on demand to some set of people or machines
, CGI (Common Gateway Interface) allows dynamic interaction
between users and a web page. It's major shortcoming is that it is
slow and makes certain tasks such as dynamic graphing difficult
Don't know?
3 of 66
Term
What is the function of the comma operator? (See TIJ page 140.)
Give this one a go later!
Separation of statements Combining multiple statements
to be evaluated into a single expression for
sequentially efficiency.
Creating a new variable that
The comma operator is
holds the result of the last
used to increment values
evaluated statement.
in a loop.
Don't know?
4 of 66
Term
How is break used within switch? (See TIJ page 151 to 152.)
, Give this one a go later!
When assigning primitives you copy the contents from one place to
another, whereas when assigning one object to another you are really
assigning one reference to another
the finalize method should work when the garbage collector calls it,
and only on the next garbage collector pass will it reclaim the objects
memory
boolean-exp ? value0 : value1
If the boolean evaluates to true, value0 is evaluated, and its result
becomes the value produced by the operator. If it evaluates to false,
value1 is evaluated.
the break causes execution to jump to the end of the
switch body ex)
switch (integral-selector) {
case integral-value1 : statement;
break; case integral-value2 :
statement; break;
Don't know?
5 of 66
Term
What are the bitwise operators? (See TIJ pages 111 to 112.)
Give this one a go later!