Exam 4: More Object Concepts

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If you give the same name to a class's instance field and to a local method variable, the instance variable overrides the method's local variable.

(True/False)
4.8/5
(48)

What is the difference between class variables and instance variables?

(Essay)
4.7/5
(33)
Match each term with the correct statement below.
Premises:
Not a number
Responses:
nested
enumeration
Java.time
Correct Answer:
Verified
Premises:
Responses:
Not a number
nested
(Matching)
4.9/5
(51)

In a Java ____statement, you use a wildcard symbol to represent all the classes in a package.

(Multiple Choice)
4.8/5
(33)

The ____ package contains is implicitly imported into Java programs and is the only automatically imported, named package.

(Multiple Choice)
4.8/5
(31)
Match each term with the correct statement below.
Premises:
Library of classes
Responses:
overloading
constant
enumeration
Correct Answer:
Verified
Premises:
Responses:
Library of classes
overloading
(Matching)
4.8/5
(37)

A(n) ____ block begins immediately after the method declaration and ends at the end of the method.

(Multiple Choice)
5.0/5
(37)

When you pass a(n) ____, you pass a memory address.

(Multiple Choice)
4.9/5
(44)

 Using Java statements, show how you can use the LocalDate class by using the full path and by using an import statement.

(Essay)
4.9/5
(46)

The java.lang package is implicitly imported into every program you write. The classes it contains are ____ that provide the basis of the Java programming language.

(Multiple Choice)
4.9/5
(34)

If a class's only constructor requires an argument, you must provide an argument for every ____ of the class that you create.

(Multiple Choice)
4.9/5
(39)

Because the square root of a negative number is not defined, what is the result of this statement: System.out.println (Math.sqrt(-16));

(Multiple Choice)
4.8/5
(33)

  In the above code, what happens to the value of aNumber when the main() method is executed? What happens to the value of aNumber when the firstMethod and secondMethod methods are executed? In the above code, what happens to the value of aNumber when the main() method is executed? What happens to the value of aNumber when the firstMethod and secondMethod methods are executed?

(Essay)
4.9/5
(35)

When an object of one class is a data field within another class, they are related by ____.

(Multiple Choice)
4.9/5
(40)

It is a convenience to be able to use one reasonable name for ____ that are functionally identical except for argument types.

(Multiple Choice)
4.8/5
(37)

The compiler determines which version of a method to call by the method's ____.

(Multiple Choice)
5.0/5
(35)

When you multiply an int and a double , the result is the int .

(True/False)
4.8/5
(47)
Match each term with the correct statement below.
Premises:
A variable that hides another variable
Responses:
shadowing
enumeration
constant
Correct Answer:
Verified
Premises:
Responses:
A variable that hides another variable
shadowing
(Matching)
4.8/5
(41)

int aMethod(int x) void aMethod(int x) In the above statements, explain why these two methods are illegal in the class.

(Essay)
4.8/5
(35)

What is a reference and what is the meaning of the keyword this ?

(Essay)
4.8/5
(38)
Showing 21 - 40 of 84
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)