GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Manhattan Associates  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 10 of 17    Print  
Question on whether Static method can be overriden


  
Total Answers and Comments: 4 Last Update: November 02, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 17, 2005 08:10:19   #1  
Lavanya        

RE: Question on whether Static method can be overriden
No. Static methods do not participate in Overriding.
 
Is this answer useful? Yes | No
May 09, 2005 07:39:46   #2  
Hari        

RE: Question on whether Static method can be overriden
Yes Statis methods can be overridden only final methods cannot be overridden
 
Is this answer useful? Yes | No
May 12, 2005 06:57:13   #3  
upender        

RE: Question on whether Static method can be overriden
yes
 
Is this answer useful? Yes | No
August 10, 2005 00:44:25   #4  
Senthil        

RE: Question on whether Static method can be overriden
Static Methods over loading is of no use for example the below code will produce a output of
B.m1
C.m1
C.m1
if we remove static in those functions we will get an ouput of
B.m1
C.m1
B.m1
class C{

static void m1()
{
System.out.println( C.m1 );
}
}
class B extends C{

static void m1()
{
System.out.println( B.m1 );
}
}


class A
{
public static void main(String str[])
{

B b new B();
C c new C();
C c1 new B();
b.m1();
c.m1();
c1.m1();

}


}

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape