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

Do I need java for windows 10?

1050


What is keyword and identifier?

1142


Difference between keyword and identifier.

1043


Can you call a method on a null object?

1019


What is java string pool?

1012


Is math an abstract class in java?

1022


How will you get the platform dependent values like line separator, path separator, etc., ?

1031


Is null == null in java?

1114


Can we override constructor in java?

1101


What is string subsequence method?

1137


Which is the best approach for creating thread ?

1220


Discuss about garbage collector in Java.

1087


What is the different types of functions?

1059


what is use of functional interface in java 8?

1034


What is a jagged array in java?

1122