h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Define Generics


  • Generics are similar to ―templates in C++.
  •  A generic is an identifier, which automatically identifies the data type of a variable.
  •  This is designed to represent a particular data type, during an object life time or a method execution.

 Two types of generics. 

  •  Representing a data type during an object life time.
  •  Representing a data type during the method execution time.


Define rules of Destructor


  • Its name must be defined as class name.
  •  It' name must be started with "~" character.
  •  Access modifier can‘t be specified for this.
  •  No arguments.
  •  No return value.
  •  Destructor overloading is not possible. That means multiple destructors can't be defined inside of a class.