CSE 2221 OSU Final Terms Questions
with 100% Correct Answers
generic/parameterized type Correct Answer: this is basically like the type of
what it is:
ex//
Queue<Integer> qi = new Queue1L<>()
in this case: Queue is the generic/parameterized type
FIFO Correct Answer: first-in, first-out is how you manipulate the strings of entries
in a QUEUE
string (math) Correct Answer: a mathematical model called mathematical
strings that is a series of zero or more entries of any other mathematical type say
T,
T is the entry type and this math type is a string of T
** there can be duplicates
** order of strings is important
formal type parameter ("T") Correct Answer: when creating a queue you are
originally creating a queue of type T (the formal type parameter) but later on
you choose the type when you parameterize it!
:
vPretest - Stuvia US
, 2
actual/argument type Correct Answer: the actual type is the type of your
queue instead of the default type "T"
wrapper type Correct Answer: an immmutable type that is basically a reference
to a primitive type: it looks diff:
ie
Integer - int
Character - char
Boolean - boolean
Double - double
diamond operator Correct Answer: when you first create a Queue you dont
have to specify twice the type of the queue(meaning you don't have to say:
Queue<Integer> qi = new Queue1L<Integer>();
you can just say: Queue<Integer> qi = new Queueu1L<>();
the diamond operator is <> and it tells you that you're still using the actual type
of Integer
auto-boxing/unboxing Correct Answer: a feature for wrapper types that lets it
be a lot more fluid and be able to be used almost as if they were a primitive
type
:
vPretest - Stuvia US