The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


i don't know what was yr error.but u had mathod over ridden problem .now run this code

Posted by ketul on November 07, 2000 at 8:17 PM

class a{
static int i;
static float g;
public static void main(String args[]){
b obj =new c1();
int a=3;
static void main(int k){
System.out.println(k+ " from a ");}
class b extends a{
static void main(int f){
System.out.println(f+ " from b class");}
class c1 extends b{

static void main(int f){
System.out.println(f+" from c1"); }

void main(String a) {
System.out.println(a+ " from c1 second");



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us