Exam 4: More Object Concepts

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

When you write your own constructors, you cannot write versions that receive parameters.

(True/False)
4.7/5
(26)

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

(Short Answer)
4.7/5
(29)

List the three things you can do that allow you to use prewritten classes.

(Essay)
4.9/5
(39)

When you overload a Java method, you write multiple methods with a shared name.

(True/False)
4.8/5
(35)

It is illegal to declare the same variable name more than once within a block.

(True/False)
4.9/5
(39)

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
(26)

You can use the asterisk (*) as a ____, which indicates that it can be replaced by any set of characters.

(Multiple Choice)
4.7/5
(26)

When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.

(Multiple Choice)
4.8/5
(32)

Object-oriented programmers use the term ____ when a child class contains a field or method that has the same name as one in the parent class.

(Multiple Choice)
4.9/5
(43)

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

(True/False)
4.7/5
(31)

Describe the impact that blocks and methods have on variables with the same name.

(Essay)
4.8/5
(46)

What is the phenomenon called shadowing?

(Essay)
5.0/5
(36)

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

(Multiple Choice)
4.9/5
(47)

What is overloading a method? What conditions must be satisfied in the parameter lists of an overloaded method?

(Essay)
4.8/5
(39)

What does it mean when a variable overrides another variable? 

(Essay)
4.8/5
(35)

What is automatic type promotion in method calls? Give an example of how this works.

(Essay)
4.8/5
(39)

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
(33)

Describe how a Java variable comes into and out of scope.

(Essay)
4.8/5
(37)

Due to automatic type promotion, when a method with a double parameter is passed an integer, the integer will be promoted to a(n) ____.

(Multiple Choice)
4.8/5
(34)

Write Java statements that use the now() and of() methods in the LocalDate class.

(Essay)
4.7/5
(39)
Showing 21 - 40 of 66
close modal

Filters

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