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
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? - - FALSE
True or False; When you use an interface, all methods in said interface have to be implemented. -
- TRUE
How does the default .sort() method sort objects? - - From least to greatest
True or False; System.out.println() automatically calls an objects toString() method - - TRUE
What are two methods that are commonly overridden? - - toString(); .equals()
What type of casting is always illegal? - - Ill call it crosscasting, but an example is casting a dog as a
cat
Select all that are correct. Why don't we just upcast everything to Objects?
A) You lose the methods and properties that give Object-Oriented Programming its power