Results 1 to 2 of 2
  1. #1
    arshanvit is offline Member
    Join Date
    Feb 2017
    Posts
    1
    Rep Power
    0

    Default argument types in overriding methods

    I have two classes A(superclass) and B(subclass).I have following test cases :

    1)A is having method run() with arguments (int,int,int) and B with (int,int,double).
    1)B is having method run() with arguments (int,int,int) and A with (int,int,double).

    Will override happen in both cases.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: argument types in overriding methods

    Will override happen
    Try writing a test program and see what happens.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 5
    Last Post: 02-08-2015, 05:01 AM
  2. Overriding inherited methods
    By programmingDummy in forum New To Java
    Replies: 1
    Last Post: 02-05-2015, 08:51 PM
  3. Explanation of nested methods as argument (Android)
    By StateMachine in forum New To Java
    Replies: 12
    Last Post: 01-17-2012, 01:49 AM
  4. Overriding methods - design problem
    By viking90 in forum New To Java
    Replies: 1
    Last Post: 03-23-2011, 10:13 PM
  5. Overriding Methods
    By AndrewM16921 in forum New To Java
    Replies: 2
    Last Post: 09-23-2009, 07:26 AM

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
  •