Posted on October 29, 2008 by Narayan
Actually Interface are just like a class where it consists only constants and they
We can extend interface via interfaces
We can implement the interface via classes.
In interface needn’t use the “public” or “abstract” keywords – all methods
declared by an interface are automatically public and abstract by default.
A simple example of interface implement is given below.
public interface [...]
Filed under: Static Features | Tagged: final static, interface, java, javanepal | 2 Comments »
Posted on October 27, 2008 by Narayan
public class Student {
private static int totalStudents;
// Other details omitted.
// Constructor.
public Student() {
// Details omitted.
// Automatically increment the student count every time we
// instantiate a new Student.
totalStudents++;
}
Filed under: Static Features | Tagged: java, javanepal, Method, static | Leave a Comment »
Posted on October 22, 2008 by Narayan
This Polymorphism is one of the special feature of OOPL(Object oriented Programming Language). The polymorphism can perform several functions with a single method. A simple example of Polymorphism is given below according to real world.
The term polymorphism refers to the ability of two or more objects belonging to different classes to respond to [...]
Filed under: Polymorphism | Tagged: javanepal, Polymorphism | 2 Comments »