Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 12 páginas
Examen

ITCS 1213 UNCC FINAL EXAM QUESTIONS WITH COMPLETE SOLUTION GRADED A+

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

ITCS 1213 UNCC FINAL EXAM Any object that can be thown as an Exception must inherit from what class? - ANSWER-Throwable n.Can a field declared as type boolean hold a value of 1? - ANSWER-No n.Can a programmer create his/her own Exception class? - ANSWER-Yes. A programmer can create their own Exception class in Java. n.Can a sub-class also be a super-class? - ANSWER-Yes, Java allows this n.Can a subclass write methods that do not appear in the superclass? - ANSWER-Yes n.Can an interface be instantiated? - ANSWER-No n.Can an interface be instantiated? - ANSWER-You can never instantiate an interface in java. n.Can an interface have fields? - ANSWER-Yes n.Can two methods in the same class definition file have the same signature? - ANSWER-No n.Can you declare fields of a class inside a method? - ANSWER-No e a for loop to execute: Is it possible to create an array in Java where the first row has 5 elements, the second row has 6 elements and the third row has 2 elements? - ANSWER-double [] [] salaries = new double [NUM_STORES][]; array[0] = new double [5]; array[1] = new double [6]; array[2] = new double [2]; n.Does a super class have to be abstract? - ANSWER-No n.Does the is-a relationship apply to classes that implement an interface? - ANSWER-No n.Does the Java compiler compile source code to machine code? - ANSWER-No, It compiles source code to byte code n.Does using the import statement make your compiled class file larger? - ANSWER-No n.Give two reasons for interfaces in the Java language. - ANSWER-To implement a list of methods and organization n.How many classes can a class directly inherit from? - ANSWER-1 n.How many classes can a given class extend? - ANSWER-one n.How many interfaces can a class implement? - ANSWER-Multiple or unlimited n.How many interfaces can another class implement - ANSWER-As many as needed n.How many public classes can a Java class file contain? - ANSWER-1 n.If a class extends an Employee class and implements a Comparable interface, what are the is-a relationships established? - ANSWER-The given class is a: is - a relationship n.If a subclass explicitly calls the constructor of the superclass, where must the call be made in the subclass constructor? - ANSWER-It will call the default if not specified n.If BankAccount( ) class has an abstract method named withDrawFunds ( ) what do you know about the SavingAccount class and the method withDrawFunds( )? - ANSWER-That the savings account class will have a method called withdraw funds n.If BankingAccount( ) has a protected method named depositFunds( ) can the CheckingAccount class override this method with a private method named depositFunds( )? - ANSWER-No because it has to be the same or less restrictive

Vista previa del contenido

ITCS 1213 UNCC FINAL EXAM QUESTIONS WITH
COMPLETE SOLUTION GRADED A+



Any object that can be thown as an Exception must inherit from what class? - ANSWER-
Throwable



n.Can a field declared as type boolean hold a value of 1? - ANSWER-No



n.Can a programmer create his/her own Exception class? - ANSWER-Yes. A programmer can
create their own Exception class in Java.



n.Can a sub-class also be a super-class? - ANSWER-Yes, Java allows this



n.Can a subclass write methods that do not appear in the superclass? - ANSWER-Yes



n.Can an interface be instantiated? - ANSWER-No



n.Can an interface be instantiated? - ANSWER-You can never instantiate an interface in java.



n.Can an interface have fields? - ANSWER-Yes



n.Can two methods in the same class definition file have the same signature? - ANSWER-No



n.Can you declare fields of a class inside a method? - ANSWER-No

, n.create a for loop to execute: Is it possible to create an array in Java where the first row has 5
elements, the second row has 6 elements and the third row has 2 elements? - ANSWER-double
[] [] salaries = new double [NUM_STORES][];

array[0] = new double [5];

array[1] = new double [6];

array[2] = new double [2];



n.Does a super class have to be abstract? - ANSWER-No



n.Does the is-a relationship apply to classes that implement an interface? - ANSWER-No



n.Does the Java compiler compile source code to machine code? - ANSWER-No, It compiles
source code to byte code



n.Does using the import statement make your compiled class file larger? - ANSWER-No



n.Give two reasons for interfaces in the Java language. - ANSWER-To implement a list of
methods and organization



n.How many classes can a class directly inherit from? - ANSWER-1



n.How many classes can a given class extend? - ANSWER-one



n.How many interfaces can a class implement? - ANSWER-Multiple or unlimited



n.How many interfaces can another class implement - ANSWER-As many as needed

Información del documento

Subido en
2 de abril de 2025
Número de páginas
12
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$15.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.
ExamCore
3.5
(6)
Vendido
33
Seguidores
11
Artículos
1697
Última venta
1 semana 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