CIT FINAL (CH 4)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Two methods that are expected to be in all Java classes are:

toString and equals

When you want the parameters in a method to be the same as the instance variables you can use the _____ parameter.

this

A program whose only task is to test a method is called a:

driver program

A variable whose meaning is confined to an object of a class is called:

instance variable

A variable whose meaning is confined to a method definition is called an/a

local variable

The name of a method and the list of ________ types in the heading of the method definition is called the method signature.

parameter

A _________ states what is assumed to be true when the method is called.

precondition

In Java, call-by-value is only used with:

primitive types

Java has a way of officially hiding details of a class definition. To hide details, you mark them as _________.

private

The parameter this refers to

the calling object

The new operator:

All of the above (Bb didn't show the rest of the answers)

Accessor Methods:

Both A and B

Java supports operator overloading.

False

Mutator methods can return integer values indicating if the change of the instance variable was a success.

False

When you give a command to run a Java program, the runtime system invokes the class constructor.

False

A method that performs some action other than returning a value is called a __________ method.

Void

Boolean expressions may be used to control if-else or while statements.

True

In a method invocation, there must be exactly the same number of arguments in parentheses as there are formal parameters in the method definition heading.

True

Method overloading is when two or more methods of the same class have the same name but differ in number or types of parameters.

True

In Java, a block is delimited by:

{ }


संबंधित स्टडी सेट्स

BMAL-590 Foundations of Business Integration and Strategic Management

View Set

Financial Accounting Chapter One

View Set

MIDTERM REVIEW (IR, NECK, SCROTUM, & BREAST)

View Set

Unit 1 Exam Practice Questions (Intro to Psychology)

View Set