Languages-Java [3i Infotech Placement]: Sample Questions 140 - 141 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 140


Write in Short

Short Answer▾

Write a program for recursive traverse?


void traverse (Node ⚹ head)


if (head == NULL)


cout << head ⇾ data << “” ;

traverse (head ⇾ next)

} ;

Question 141


Describe in Detail


Which methods in the Object class are declared as final?


Following methods are Final:

  • GetClass () :

    Returns the runtime class of an object.

  • Notify () :

    Wakes up a single thread that is waiting on this object՚s monitor.

  • NotifyAll () :

    Wakes up all threads that are waiting on this object՚s monitor.

  • wait () :

    Causes current thread to wait until another thread invokes the notify () method or the notifyAll () method for this object.

Developed by: