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? - Throwable Can a field declared as type boolean hold a value of 1? - No Can a programmer create his/her own Exception class? - Yes. A programmer can create their own Exception class in Java. Can a sub-class also be a super-class? - Yes, Java allows this Can a subclass write methods that do not appear in the superclass? - Yes Can an interface be instantiated? - No Can an interface be instantiated? - You can never instantiate an interface in java. Can an interface have fields? - Yes Can two methods in the same class definition file have the same signature? - No Can you declare fields of a class inside a method? - No 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? - double [] [] salaries = new double [NUM_STORES][]; array[0] = new double [5]; array[1] = new double [6]; array[2] = new double [2];Does a super class have to be abstract? - No Does the is-a relationship apply to classes that implement an interface? - No Does the Java compiler compile source code to machine code? - No, It compiles source code to byte code Does using the import statement make your compiled class file larger? - No
Written for
- Institution
- ITCS 1213 UNCC
- Course
- ITCS 1213 UNCC
Document information
- Uploaded on
- June 23, 2024
- Number of pages
- 11
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal