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.
Message:
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; obj.main(a); } 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"); } }
Replies:
|