• ¿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 7 páginas
Examen

CMSC 132 EXAM #1(All solved)

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

Classes can only extend more than one other class if at least one of those classes is an abstract class. correct answers False - a Class can never extend more than one class. Downcasting can be done implicitly. correct answers False - it must be done explicitly or your code will not compile. "Sideways" casting is never allowed correct answers True '' will refer to the current object, treating it as an instance of the parent of the parent of the current class. correct answers True. For example, if class C extends class B, which extends class A, then calling "String()" from within class C will return the result of A's toString method. Constructors in subclasses must directly invoke the constructors of every single parent class before initializing the instance variables unique to that subclass. correct answers False - usually, a single call to the constructor of the immediate superclass is needed, however. This is done with the keyword 'super' and must be the first line in the constructor. . Assume there is a method named foo in a superclass A, which has been overridden in B (a subclass of A). If () is called from within class B, it will run the foo() method from class A, but if foo() is called from within class B, it will run the foo() method from class B. correct answers True Every class is a subclass of Object. correct answers True - note that this question doesn't necessarily mean that the class is ONLY a subclass of Object, but every class does inherit from Object, either directly or indirectly. When you override a method, you are allowed to change the number of arguments. correct answers False - the method signature must be exactly the same When you overload a method, you are allowed to change the number of arguments. correct answers True To sort an ArrayList of MyObject objects using C, MyObject must have an implementation of the compareTo method defined in the class. correct answers False - you can also pass in a Comparator with the compare method. Unchecked exceptions are generally for common exceptions that need to be accounted for. correct answers False - this is describing checked exceptions, not unchecked exceptions. An abstract class must include at least one abstract method. correct answers False An abstract class can contain instance variables and constructors. correct answers True


Información del documento

Subido en
28 de mayo de 2024
Número de páginas
7
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas
$11.69

¿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.
Vendido
23
Seguidores
6
Artículos
4026
Última venta
1 mes 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

Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.