(TCO 2) Variables should be declared as local variables of a method if A)they ar
ID: 1974434 • Letter: #
Question
(TCO 2) Variables should be declared as local variables of a method if
A)they are used as arguments to other methods of the class.
B)their values are only used by the method.
C)their values must be shared between different methods of the class.
D)they are method parameters.
(TCO 2) What is a primary difference between inheritance in Java and inheritance in C++?
A) C++ permits derived classes to execute base class constructors, Java does not.
B) Inheritance in Java is protected, whereas in C++ it can be public, private, or protected.
C)C++ permits inheritance from multiple classes, Java does not.
D)Java allows multiple inheritance, C++ does not.
Explanation / Answer
1). Answer is option B
Their values are only used by the method
2) Answer is option B
Inheritance in java is protected , where as in C ++ it can be public ,private, or protected
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.