1. Can two classes each define a method with the same name? (Points : 2) Yes, as
ID: 3530977 • Letter: 1
Question
1. Can two classes each define a method with the same name? (Points : 2) Yes, as long as the method has the same number of parameters in each class.
Yes, this is possible.
No, this is not possible because the compiler would not know which method to call.
Yes, but only if the classes have the same name.
(Points : 2) Check for potential problems and abort the application when a problem is encountered.
Check for potential problems and throw an exception.
Check for potential problems, catch the mistake, and try to fix it.
Ignore the problem, all applications crash at some point.
Explanation / Answer
1 Yes, this is possible.
2
Check for potential problems and abort the application when a problem is encountered.
3) 2
4) public int Add(int x) ; public int Add(int y)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.