We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Practice
  • Certification
  • Compete
  • Career Fair
  • Hiring developers?
  1. Practice
  2. Java
  3. Object Oriented Programming
  4. Java Inheritance I
  5. Discussions

Java Inheritance I

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 41 Discussions, By:

votes

Please Login in order to post a comment

  • dvt32 4 years ago+ 0 comments

    These challenges are cool and all, but in this particular one - you don't really practice inheritance, do you? The "inheritance" part is pretty much done for you and you're basicallly practicing writing a simple method.

    Still, I love HackerRank and this is just a minor issue.

    12|
    Permalink
  • atreides 4 years ago+ 0 comments

    "then modify the main method accordingly" would you be so kind and remove that statement ? or... let us modify the main method then....

    8|
    Permalink
  • hamedmoradi_mai1 2 years ago+ 0 comments
    class Bird extends Animal implements asd{
    	void fly(){
    		System.out.println("I am flying");
    	}
        public void sing() {
            System.out.println("I am singing");
        }
    }
    interface asd{
        void sing();
    }
    
    5|
    Permalink
  • siddharth_nawani 1 year ago+ 0 comments

    void sing() { System.out.println("I am singing"); }

    3|
    Permalink
  • tejasriveenam 11 months ago+ 0 comments

    class Bird extends Animal implements asd{ void fly(){ System.out.println("I am flying"); } public void sing() { System.out.println("I am singing"); } } interface asd{ void sing(); }

    2|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature