Method Overloading example


class Car {

}

class Maruti extends Car {

}

class Alto extends Maruti {

}
class Swift{}

public class TestMethodOverLoading1 {

static void printCar(Car c) {
System.out.print("A car is created");
}

static void printCar(Maruti m) {
System.out.println("A car name Maruti is created");
}

static void printCar(Object obj) {
System.out.println("Super Class is called");
}

public static void main(String args[]) {
Alto a = new Alto();
printCar(a); //method with maruti object will be called
Swift s = new Swift(); //superclass object will be called
printCar(s);

}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...