View RSS Feed

Java Object

Object-oriented programming in Java.

  1. What is overloading in java

    by , 04-26-2012 at 06:40 PM
    Two or more than two methods could be defined in Java, within similar class which has similar names with different parameter declarations. In this particular case, methods are overloaded and this is known as method overloading. Method overloading is method by which polymorphism is implemented.

    Sample program of overloading:
    Java Code:
    class Overloading {
    void test() {
    System.out.println("No parameters");
    }
    
    void test(int a, int b) {
    ...
    Categories
    Overloading