True/False question. Explain your answers why you think it true/false
• The static storage allocation approach creates space for a method when the method is invoked.
• Recursive methods often have fewer local variables than the equivalent nonrecursive methods.
• The following returns 10 when passed the argument 3?
int example(int n)
{
if (n == 0)
return 0;
else
return example(n – 1) + n * n;
}
• The following returns 3 when passed the argument 3783.
int example(int n)
{
if (n < 10)
return 1;
else
return 1 + example(n/10);
}
• A java interface can inherit from at most one other interface.
• When implementing a queue with a linked list, the front of the queue is also the front of the linked list.
• A queue is a first in, last out structure.
• Even though our queues will be generic, our QueueInterface is not generic.
• Depending on the circumstances, the dequeue method of our LinkedQueue class sometimes throws the QueueUnderflowException.
• It is possible to use an array to implement a linked list.