ClearFront News.

Reliable information, timely updates, and trusted insights on global events and essential topics.

politics

Which of the following statements are correct about the Stack collection?

By Henry Morales |

Which of the following statements are correct about the Stack collection? It can be used for evaluation of expressions. All elements in the Stack collection can be accessed using an enumerator. It is used to maintain a FIFO list.

Which of the following statements are correct about the collection classes available in framework?

Discussion Forum

Que.Which of the following statements are correct about the Collection Classes available in Framework Class Library?
b.Elements stored in a collection can be retrieved but cannot be modified.
c.It is not easy to adopt the existing Collection classes for newtype of objects.

Which of the following statements are correct about a HashTable collection?

It is a ordered collection. It is an indexed collection. It implements a IDictionaryEnumerator interface in its inner class. The key – value pairs present in a HashTable can be accessed using the Keys and Values properties of the inner class that implements the IDictionaryEnumerator interface.

Which one of the code snippet given in options is used to check whether queue is full or not?

isFull() – Check if queue is full or not.

Which of the following is not a collection interface?

Which of this interface is not a part of Java’s collection framework? Explanation: SortedList is not a part of collection framework.

Which of the following is a correct difference between HashMap and Hashtable?

HashMap is non-synchronized. It is not thread-safe and can’t be shared between many threads without proper synchronization code whereas Hashtable is synchronized. HashMap allows one null key and multiple null values whereas Hashtable doesn’t allow any null key or value.

Which is the incorrect statement about delegate?

Discussion Forum

Que.Which of the following is an incorrect statement about delegate?
b.delegates could be shared
c.delegates are type safe wrappers for function pointers
d.delegate is a value type
Answer:delegates are type safe wrappers for function pointers

What is the condition for empty queue?

If the value of front is less than MIN or 0, it tells that the queue is not yet initialized, hence empty.

What are the types of queue?

There are four different types of queues:

  • Simple Queue.
  • Circular Queue.
  • Priority Queue.
  • Double Ended Queue.

    Is HashSet a collection?

    HashSet is an unordered collection. It does not maintain the order in which the elements are inserted. HashSet internally uses a HashMap to store its elements. HashSet is not thread-safe.