Results 1 to 6 of 6

Thread: Inheritance

  1. #1
    Nerijus is offline Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    22
    Rep Power
    0

    Default Inheritance

    I have two classes bank1 and bank2.
    bank2 extends bank.
    Bank2 have one Overriding method. bank1 have many methods and i need that when user pressed button one method from bank1 classes overrides form bank2.
    Any ideas how to do this? :)

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Nerijus View Post
    I have two classes bank1 and bank2.
    bank2 extends bank.
    Bank2 have one Overriding method. bank1 have many methods and i need that when user pressed button one method from bank1 classes overrides form bank2.
    Any ideas how to do this? :)
    Sorry, but your post is confusing me. If you don't get any decent responses, you may benefit by greatly clarifying what's going on. Also, please be very careful with spelling and capitalization as this matters in Java.

    Best of luck!

  3. #3
    ujjal.ruet is offline Member
    Join Date
    Apr 2010
    Posts
    9
    Rep Power
    0

    Default

    check the statement..
    bank2 extends [bank]

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I think it's better if you can post some code segment and clarify your requirement, may be with a dummy code.

  5. #5
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,458
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Nerijus View Post
    I have two classes bank1 and bank2.
    bank2 extends bank.
    Bank2 have one Overriding method. bank1 have many methods and i need that when user pressed button one method from bank1 classes overrides form bank2.
    Any ideas how to do this? :)
    As far as I understand your question you have this:

    Java Code:
    public class bank { ... }
    public class bank1 { ... }
    public class bank2 extends bank { ... }
    I didn't understand the rest of your question.

    kind regards,

    Jos

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Nerijus View Post
    Bank2 have one Overriding method. bank1 have many methods and i need that when user pressed button one method from bank1 classes overrides form bank2.
    You want to invoke a method of a one class from the other, isn't it?

Similar Threads

  1. Inheritance
    By gpio in forum Advanced Java
    Replies: 14
    Last Post: 11-20-2009, 10:41 AM
  2. Inheritance example
    By kris4u4ever in forum New To Java
    Replies: 3
    Last Post: 03-21-2009, 02:53 PM
  3. inheritance
    By itaipee in forum New To Java
    Replies: 6
    Last Post: 01-20-2009, 08:18 PM
  4. Inheritance
    By mew in forum New To Java
    Replies: 1
    Last Post: 12-07-2007, 06:08 PM
  5. Inheritance in GUI
    By Marty in forum SWT / JFace
    Replies: 2
    Last Post: 05-11-2007, 12:54 AM

Posting Permissions

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