Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2015
    Rep Power

    Default Overriding inherited methods

    Hello guys,

    I am new to this forum and I will probably be popping up rather frequently. I am in a programming class that I am struggling with. I am actually interested in learning this material though so its really frustrating. I appreciate the help in advance.

    So the first thing I would like to ask about is overriding inherited methods. I am asked to override methods in one of my assignments and I am not really sure how to go about doing it so if you could give me a brief overview with maybe an example I would really appreciate it.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: Overriding inherited methods

    If a method f() is defined (not private) in a superclass, define it again in a subclass; the latter definition overrides the first one.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Do inherited methods use their instance variables?
    By lazerwing in forum New To Java
    Replies: 7
    Last Post: 01-08-2014, 04:45 PM
  2. Using non-inherited methods of subclass
    By jammas615 in forum Advanced Java
    Replies: 3
    Last Post: 12-27-2011, 06:23 AM
  3. Inheritence : How the inherited methods behave
    By spartan in forum New To Java
    Replies: 4
    Last Post: 05-23-2011, 09:46 PM
  4. [SOLVED] Disabling Inherited Methods
    By Singing Boyo in forum New To Java
    Replies: 7
    Last Post: 05-17-2009, 08:04 AM
  5. hiding inherited methods
    By java_fun2007 in forum New To Java
    Replies: 1
    Last Post: 01-05-2008, 03:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts