Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can static methods be overridden?

Answer Posted / sumit pal singh

static class Class1 {
    public static int Method1(){
          return 0;
    }
}
static class Class2 extends Class1 {
    public static int Method1(){
          return 1;
    }




}
public static class Main {
    public static void main(String[] args){
            
          Class1.Method1();
          Class2.Method1();
    }
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the best sorting technique in java?

983


What is object-oriented paradigm?

1067


Is java free for businesses?

1070


Where is core java used?

1013


hr interview how many minutes asking question

2042


Explain about exception propagation?

1034


When should I use singleton?

1038


What is the relationship between class and object?

1045


is it possible to instantiate the math class?

1034


What is autoboxing and unboxing?

1005


Can singleton class be inherited in java?

1000


what is object slice?

2084


When throws keyword is used?

1001


What is rmi and steps involved in developing an rmi object?

1065


How hashmap increases its size in java?

989