Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
Given the following method in a parent class, which of the following methods in a child class will NOT successfully override the parent class method?
public void addNumber(int a, int b) { /* Implementation not shown */ }
@Override public void addNumber(int a, int b) { /* Implementation not shown */ }
@Override public void addNumber(int b, int a) { /* Implementation not shown */ }
@Override public void addNumber(double a, double b) { /* Implementation not shown */ }
@Override public void addNumber(int x, int b) { /* Implementation not shown */ }