Computer Science  >  EXAM  >  COMP 401 Midterm Exam 2. Spring 2021. University of North Carolina (All)

COMP 401 Midterm Exam 2. Spring 2021. University of North Carolina

Document Content and Description Below

COMP 401 Midterm Exam 2. Spring 2021. University of North Carolina.I have not received nor given any unauthorized assistance in completing this exam. Signature: Name: PID: ... This page intentionally left blank. Part I: True or False 30 questions, 1 points each, 30 points total. The for (Object o : iterable) construct only works for built-in arrays and ArrayLists. Subinterfaces are an example of inheritance. A subinterface can override methods specified in its parent interface. A class that implements a subinterface has an "is-a" relationship with the parent interface. A class must explicitly specify that it is implementing both a subinterface and its parent interface. All methods in the parent interface must also be specified in the subinterface. A class that implements a subinterface must be extended from a class that implements the parent interface. Only subclasses can implement subinterfaces. A subclass inherits both public and protected instance variables from the parent class. A subclass can directly access private instance variables declared in the parent class. A method defined by a subclass is unable to invoke a private method defined in the parent class. A subclass can not specify methods not already specified in the parent class. Subclassing is useful for extending existing classes with new behavior. The implementation of an overriding method in the subclass must have the same method signature as a method defined in the parent class. A subclass constructor can use super to explicitly invoke a constructor of its parent class. A call to super can be invoked anywhere within a subclass constructor. A subclass constructor can invoke any method of the parent class by using super. In an overriding method, super can be used to invoke the same method as specified in the parent class. All overriding methods in Java are virtual. A finally block will not be called unless an exception occurs. Within a try-catch-finally construct, the finally block will execute even if a return statement is encountered. [Show More]

Last updated: 3 years ago

Preview 1 out of 15 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of COMP 401 Midterm Exam 2. Spring 2021. University of North Carolina document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$15.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

95
0

Document information


Connected school, study & course


About the document


Uploaded On

Sep 30, 2021

Number of pages

15

Written in

All

Seller


Profile illustration for Quality Suppliers
Quality Suppliers

Member since 5 years

132 Documents Sold

Reviews Received
14
0
1
0
3
Additional information

This document has been written for:

Uploaded

Sep 30, 2021

Downloads

 0

Views

 95

Document Keyword Tags

More From Quality Suppliers

View all Quality Suppliers's documents »

Recommended For You

Get more on EXAM »

$15.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·