Sunday, 26 October 2014

Constructor in java

Java constructors are the methods which are used to initialize objects. Constructor has the same name as that of class, they are called or invoked when an object of class is created and can't be called explicitly.  Example of Constructor:public class A { public A() // constructor method { } } Types of Constructor 1. Default Constructor. 2. Parameterized Constructor. 1. Default Constructor.If...

Inheritance in java

00:11 Posted by Unknown No comments
Inheritance : Inheritance can be defined as the process where one object acquires the properties of another. With the use of inheritance the information is made manageable in a hierarchical order. Using inheritance you can create general class that defines common set of related items.This class can be inherited by other classes. In the terminology of java  , a class that is inherited is called...