3i Infotech Papers: Sample Questions 874 - 876 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 874

» Languages » Assembly Language

Essay Question▾

Describe in Detail

How is linked list implemented?


Understanding of implimentation of linked list

Understanding of Implimentation of Linked List

Understanding of implimentation of linked list

  • Linked list is made from nodes.

  • A node has two fields:

    • Object field holds the actual data

    • Next (pointer) holds starting location of the next node.

  • Head points to the first node.

  • Last node typically points to NULL.

Question number: 875

» Languages » Java



Is the Following Statement True or False?

Java supports multiple inheritances?




Java does not support Multiple inheritance

Java Does Not Support Multiple Inheritance

Java does not support Multiple inheritance.

  • False

  • Java does not allow multiple inheritances to avoid the ambiguity (see diagram above).

  • Multiple inheritance happens when a class extends more than one superclass.

Question number: 876

» Languages » Java

Essay Question▾

Describe in Detail

What are adapter classes


The object adapter pattern

The Object Adapter Pattern

The object adapter pattern

  • Provides the default implementation of an interface.

  • A class inheriting from adapter class is not forced to provide the implementation of all the methods of listener interface.

  • Useful for processing only few of the events- provide definition of only few functions in the interface relevant to us.

Advantages of the Adapter Class

  • Assists bringing together unrelated classes.

  • Increases transparency of classes.

  • Allows including related patterns in a class.

  • Provides a pluggable kit for developing applications.

  • Makes an interface highly reusable.

Example of adapter class:

Example of adapter class

Example of Adapter Class

Example of adapter class