MCIT 591 FINAL EXAM (ACTUAL / ) | QUESTIONS
WITH 100% VERIFIED CORRECT ANSWERS | | LATEST
UPDATE
What is the method signature for the main method of a Java program?main(String[] args)
What is overloading?two methods that have the same name but different method signatures
What is overriding?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() True
What is the syntax of Inheritance?class
- / 2
Liskov Substitution Principle in any line of code, a class can always be replaced by one of its subclasses. An interface can always be replaced by some implementation of that interface
How would we tell if a class is a child or parent?-If it has an "is a" relationship -Example) Goalkeeper "is a" Player
What is the syntax to call an instance variable from the parent class, in the child class?Do "super.nameOfVariable"
Which type of casting is legal?Upcasting is legal
Define Upcasting
Going to a more general data type ( Example: casting a dog as an
animal)
True or False; The return of a method is part of its signature?
- / 2