Wednesday, March 11, 2009

Puzzle 6 – Overloaded

Language – Java | Type – Concept | Last date 15-Mar-2009 12:00 p.m. IST | Points 2

Have you ever felt over loaded with work? Here is something to cheer you up …
package com.twisters;
class Base{}
public class Child extends Base{
public boolean equals(Base b){
return false;
public static void main(String[] args) {
Base base;
Child child;
child = new Child();
base = child;

System.out.println("Child Equals Base");

System.out.println("Base Equals Child");
Got an answer? Why don’t you leave it here.

No comments:

Post a Comment

Solution for this question?