• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 5 páginas
Examen

Java Chapter 10 Test Questions with Verified Solutions

Document preview thumbnail
Vista previa 2 fuera de 5 páginas

Java Chapter 10 Test Questions with Verified Solutions

Vista previa del contenido

Java Chapter 10 Test Questions with Verified
Solutions
Which of the following statements depicts the valid format to call a superclass constructor from
a subclass constructor? ✔️✔️super(name, score);


If jrStudent is an object of Student, which of the following statements will result in a value of
true? ✔️✔️jrStudent instanceof Student



Which statement correctly declares a sedan object of the Car class? ✔️✔️Car sedan = new Car();


You would like to make a member of a class visible in all subclasses regardless of what package
they are in. Which one of the following keywords would achieve this? ✔️✔️protected


A way to discover which of two classes is the base class and which is the subclass is to _____.
✔️✔️try saying the two class names together in a sentence with the phrase "is a(n)



Employing inheritance reduces errors because _____. ✔️✔️many of the methods you need have
already been used and tested



A base class can also be called a _____. ✔️✔️Superclass


Which of the following choices is the best example of a parent class/child class relationship?
✔️✔️Dog/Poodle



The Java keyword that creates inheritance is _____. ✔️✔️Extends

, A class named Building has a public, nonstatic method named getFloors(). If School is a child
class of Building, and modelHigh is an object of type School, which of the following statements
is valid? ✔️✔️modelHigh.getFloors();



Which of the following statements is true? ✔️✔️A child class inherits from a parent class.


When a subclass method has the same name and argument types as a superclass method, the
subclass method _____ the superclass method. ✔️✔️Overrides


When you instantiate an object that is a member of a subclass, the _____ constructor executes
first. ✔️✔️Parent class



The keyword super always refers to the _____ of the class in which you use it. ✔️✔️Parent class



If the only constructor in a superclass requires arguments, its subclass _____. ✔️✔️must contain
a constructor


Programmers and analysts sometimes use a graphical language called _____ to describe classes
and object-oriented processes. ✔️✔️Unified Modeling Language


In Java, using the same method name to indicate different implementations is called _____.
✔️✔️polymorphism



In Java, the concept of keeping data private is known as _____. ✔️✔️information hiding


If a method has been overridden but you want to use the superclass version within the
subclass, you can use the keyword _____ to access the parent class method. ✔️✔️Super



Within a subclass, you cannot override _____ methods. ✔️✔️Static

Información del documento

Subido en
21 de marzo de 2025
Número de páginas
5
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$8.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
KateJones
4.8
(12)
Vendido
32
Seguidores
0
Artículos
5716
Última venta
4 semanas hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes