Exam 4: More Object Concepts

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

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

(True/False)
4.8/5
(34)

An alternative to importing a class is to import an entire package of classes.

(True/False)
4.8/5
(44)

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

(Essay)
4.7/5
(46)

The ____ package contains frequently used classes and is implicitly imported into Java programs.

(Multiple Choice)
4.7/5
(34)

Another name for a nonstatic member class is a(n) ____.

(Multiple Choice)
4.8/5
(43)

A variable comes into existence, or ____, when you declare it.

(Multiple Choice)
4.8/5
(32)

A(n) ____________________ is simply a folder that provides a convenient grouping for classes.

(Short Answer)
4.8/5
(33)

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

(Multiple Choice)
4.8/5
(31)

When you ____________________ methods, you risk creating an ambiguous situation-one in which the compiler cannot determine which method to use.

(Short Answer)
4.8/5
(32)

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

(Multiple Choice)
4.9/5
(36)

____ variables are variables that are shared by every instantiation of a class.

(Multiple Choice)
4.9/5
(44)

____ involves using one term to indicate diverse meanings, or writing multiple methods with the same name but with different parameter lists.

(Multiple Choice)
4.8/5
(28)

What does a programmer need to know in order to use two variables with the same name in a class?

(Essay)
4.9/5
(40)

public class StudentScores { private int ScoreOne; private int ScoreTwo; private int ScoreThree; ____ ____ ____ ____ ____ } Suppose you want to assign all students a score of 95 on the third test. Using the code above, fill in the blank lines provided to create a two-parameter constructor that will require parameters for the first and second test score data fields, and will assign a value of 95 to the third test score data field. Be sure to include the necessary brackets and semicolons.

(Essay)
4.9/5
(45)

Describe the purpose of creating and calling constructors that receive parameters. Why would you overload constructors?

(Essay)
4.9/5
(33)

Explain the java.lang package and why it is important. How does this relate to the java.lang.Math class?

(Essay)
4.9/5
(30)

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

(True/False)
4.7/5
(40)

Match each term with the correct statement below. -A variable comes into existence

(Multiple Choice)
4.8/5
(43)

Describe how a programmer can make a variable in or out of scope.

(Essay)
4.8/5
(33)

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

(Multiple Choice)
4.8/5
(34)
Showing 41 - 60 of 67
close modal

Filters

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