Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes

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

What is Javadoc?

(Short Answer)
4.8/5
(39)

Which of the following statements regarding the default initial value of instance variables byte and boolean is correct?

(Multiple Choice)
4.9/5
(40)

Name duplication is when a file with the same name as a file you are trying to use already exists.

(True/False)
4.8/5
(39)

The access modifier of constructors should be __________.

(Short Answer)
4.9/5
(41)

The enum functionality is built into java.lang, so we must use an import statement to define enum types.

(True/False)
4.8/5
(40)

If the return type of the method is void, as in main, there is no need for a return statement. Given that control automatically returns to the caller when the end of the method is reached, most programmers omit the return statement in void methods.

(True/False)
4.9/5
(33)

A _____________ is a collection of related classes that can be imported into programs.

(Multiple Choice)
4.9/5
(29)

Which of the following is a correct class name?

(Multiple Choice)
4.8/5
(38)

How does a method know for which object the method was called?

(Multiple Choice)
4.8/5
(37)

Which of the following is not one of the criteria for a well-defined class?

(Multiple Choice)
4.8/5
(51)

Declaring a variable with the same name as the parameter of a method inside the method body will not have any effect.

(True/False)
4.9/5
(39)

We can define class variables using the keyword __________.

(Short Answer)
4.9/5
(32)

What is an advantage of returning the reference this for several methods-for example, mutators?

(Short Answer)
4.8/5
(35)

Construct a method in which you could omit the return expression.

(Essay)
4.9/5
(30)

In the class header public class TV, public is the access modifier and TV is the name of the class.

(True/False)
4.7/5
(33)

Methods that are defined to be non-static are subject to which of the following important restrictions?

(Multiple Choice)
4.7/5
(38)

A javadoc comment starts with:

(Multiple Choice)
4.7/5
(36)

Compare and contrast methods with instance variables.

(Essay)
4.8/5
(36)

When we initialize an enum type, we use String literals.

(True/False)
4.8/5
(41)

static methods can use the object reference this.

(True/False)
4.8/5
(46)
Showing 21 - 40 of 78
close modal

Filters

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