I have questions of all the following. Please help~ Thank you!
# In Java, dynamic binding is used for all methods.
False, static binding is used as well?
# A class labeled as final cannot be used as a base class.
False? Can’t you still use the class as a parent class even if it is final?
# Polymorphism refers to how identical code can produce different effects depending on the actual type of the object being processed.
True: Through polymorphism the same code can have different implementations depending on the object calling it?
# Polymorphism refers to how structure and behavior can be shared between similar kinds of objects.
False? I don’t know what it’s called but isn’t this not Polymorphism?
# When a derived class is instantiated, its base class no-argument constructor is called whether or not an explicit call to super( ) is made.
True? Doesn’t it automatically call the parent class’s constructor?
# When implementing a derived class’ copy constructor, its base class copy constructor is automatically called whether or not an explicit call to super( ) is made.
True?
# The protected access specifier should be used for instance variables of a base class that are used in a derived class.
False: shouldn’t it be private or public, and not protected?
Thank you for the help!
1) # In Java, dynamic binding is used for all methods.
TRUE, java we use copy by value so everything is being settled down through Dynamic binding. Its like pointer to pointer in c
2)# A class labeled as final cannot be used as a base class.
true: as you cant override ,so final class dont have child classes
3)# Polymorphism refers to how identical code can produce different effects depending on the actual type of the object being processed.
false: identical code?they are not identical ,it can be narrow or broader
4)
# The protected access specifier should be used for instance variables of a base class that are used in a derived class.
true ,protected access is available for derived class from different packages.private is limited to that class only.
rest seems ok
hope this helps
Cheers:)