INSY 4305 Exam 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A(n)___class cannot be instantiated

Abstract

In Java, you do not use the new operator when you use a(n) ___

Initialization list

If you don't provide an access specifier for a class member, the class member is given ________ access by default.

Package

Given the following method header, what will be returned from the method? public Rectangle getRectangle()

The address of an object of the Rectangle class.

When individual element of an array is passed to a mothod___

The method does not have access to the original array

enum Tree (OAK, MAPLE, PINE). What is the fully-qualified name of the PINE enum Tree?

Tree.PINE

To compare two object in a class, ____

Write equals method that will make a field by field compare of the two objects.

When a field is declared static, there will be

a copy of the field for each method in the class.

When a method's return type is a class, what is actually returned to the calling program?

a reference of an object of that class.

All fields declared in an interface

are treated as final and static

Java performs ________, which means that it does not allow a statement to use a subscript that is outside the range of valid subscripts for the array.

array bounds checking

Which of the following is the operator used to determine whether an object is an instance of a particular class?

instanceOf

A deep copy of an object___

is an operation that copies an aggregate object, and all the objects it references

If numbers is a two-dimensional array, which of the following would give the number of columns in row r?

numbers[r].lenght

A subclass can directly access___

only public and protected members of the superclass

If a method in a subclass has the same signature as a method in the superclass, the subclass method ________ the superclass method.

overrides

The Binary search algorithm

will cut the portion of the array being searched in half each it fails to locate the search value.

If the 'This' variable is used to call a constructor,___

A compiler error will result if it is not the first statement of the constructor.

A class that implements an interface but does not declare all of the interface's method must be declared ___.

Abstract

___ tells the Java compiler that a method is meant to overrride in the superclass.

@Overrride

Polymorphism allows for specifics to be dealt with during:

execution.


Kaugnay na mga set ng pag-aaral

Exegesis of Poetic and Wisdom Literature, Exam 3, Dr. Parke, Mississippi College

View Set

Sinoatrial and Atrioventricular Node

View Set

DMV Driving written test quizzes

View Set