The Gateway to Computer Science Excellence
+4 votes

When a method in subclass has the same name and type signatures as a method in the superclass, then the method in the subclass ____ the method in the superclass.

  1. Overloads
  2. Friendhips
  3. Inherits
  4. Overrides
in Object Oriented Programming by Veteran (105k points)
recategorized by | 861 views

3 Answers

+1 vote

int (*f())[ ]; : a function returning a pointer to an array of integers.

int *f()[ ]; : a.function returning an array of pointers to integers

A is answer

by Veteran (63k points)
question and ans are not related
+1 vote

ans is D

An instance method in a subclass with the same signature (name, plus the number and the type of its parameters) and return type as an instance method in the superclass overrides the superclass's method.

The overriding method has the same name, number and type of parameters, and return type as the method that it overrides. An overriding method can also return a subtype of the type returned by the overridden method. This subtype is called a covariant return type.

by Boss (49.3k points)
0 votes
by Junior (951 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
104,890 users