Why is the isEmpty() member method called?


The isEmpty() member method is called within the dequeue process to determine if there is an item in the queue to be removed i.e. isEmpty() is called to decide whether the queue has at least one element. This method is called by the dequeue() method before returning the front element.



Explore posts in the same categories: Data Structure Interview Questions


BOOKMARK THIS : del.icio.us | Digg it | Furl | reddit |


Related Questions :

  • What does isEmpty() member method determines?
  • isEmpty() checks if the stack has at least one element. This method is called by Pop() before retrieving and returning...
  • What method removes the value from the top of a stack?
  • The pop() member method removes the value from the top of a stack, which is then returned by the pop()...
  • What is “this” pointer?
  • The this pointer is a pointer accessible only within the member functions of a class, struct, or union type. It...
  • What is the lifecycle of an applet?
  • init() method - Can be called when an applet is first loaded start() method - Can be called each time...
  • What are the Applet’s Life Cycle methods? Explain them?
  • Following are methods in the life cycle of an Applet: init() method - called when an applet is first loaded. This...
  • Define precondition and post-condition to a member function.
  • Precondition:-A precondition is a condition that must be true on entry to a member function. A class is used correctly...
  • What is Method Overriding? How to override a function in C#?
  • Use the override modifier to modify a method, a property, an indexer, or an event. An override method provides a...
  • What is the difference between a constructor and a method?
  • A constructor is a member function of a class that is used to create objects of that class. It has...
  • What is a modifier?
  • A modifier, also called a modifying function is a member function that changes the value of at least one data...
  • When is update method called ?
  • Whenever a screen needs redrawing (e.g., upon creation, resizing, validating) the update method is called. By default, ...

    Comment:

    You must be logged in to post a comment.