Quiz 06 – Polymorphism – Overloading
Graded Quiz • 30 min Quiz06 Questions Week 3
Re⥃askly Logo

Quiz 06 – Polymorphism – Overloading

Graded Quiz • 30 min Quiz06 Questions Week 3
Practice More Quizzes:
Quiz
07 Questions Week 1
Quiz
05 Questions Week 2
Quiz
06 Questions Week 2
Quiz
Quiz

Q:

Suppose you have the code below. Is ‘int printSomething(int i, int j) { … }’ a valid overloaded method? public void printSomething(int i) { System.out.print(i); }

Q:

Suppose you have the code below. Is ‘void printSomething(String i) { … }’ a valid overloaded method? public void printSomething(int i) { System.out.print(i); }

Q:

You can have two overloaded methods with a difference only in the return type.

Q:

A method signature consists of:

Q:

Suppose you have the code below. Is ‘String printSomething(String i) { … }’ a valid overloaded method? public void printSomething(int i) { System.out.print(i); }

Q:

Suppose you have the code below. Is ‘void printSomething(char i, int j) { … }’ a valid overloaded method? public void printSomething(int i, char j) { System.out.print(i + “, ” + j); }

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Find Questions in This Page: "CTRL+F"