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

What is difference between equals and hashcode method?

1064


Explain about automatic type conversion in java?

1019


Can you explain the usages of class.forname()?

1019


Can we have multiple public classes in a java source file?

1121


What is floor in java?

993


When do I need to use reflection feature in java?

1022


What is a functional interface?

979


Define class?

986


How do I get the | symbol on my keyboard?

1039


What is tochararray in java?

888


Which is easier netbeans or eclipse?

1022


Explain about doubly linked list

983


What must a class do to implement an interface in java programming?

984


Is there any difference between synchronized methods and synchronized statements?

1058


How objects are stored in java?

994