MCIT 591 Final Exam | 40 Questions with 100% Correct Answers | Updated & Verified
MCIT 591 Final Exam
What is the method signature for the main method of a Java program? – ANS – main(String[]
args)
What is overloading? – ANS – two methods that have the same name but different method
signatures
What is overriding? – ANS – Declaring a method in a sub class which is already present in the
parent class in order to make the method more specialized to that sub class
True or False, assertEquals uses .Equals() – ANS – True
If you have a child class that is extended a parent class, and that parent class has a protected
method, can the child class utilize that method? – ANS – Yes! the only time it couldn’t ( as far as
I know) is when the method is private
What is cohesion? – ANS – similar tasks should be in the same class
What is coupling? – ANS – interaction between two classes should be kept low
What does DRY mean? – ANS – Do not repeat yourself !
Method Signature – ANS – name of the method and the method parameters along with their data
types
Polymorphism – ANS – principle that allows the same method to exist in different forms
Why do we utilize polymorphism? – ANS – -Because it allows us to provide similar code in two
or more similar forms
Powered by https://learnexams.com/search/study?query=
