Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 The Integer and Character classes are examples of ____ framework clas

ID: 3808734 • Letter: Q

Question

QUESTION 1

The Integer and Character classes are examples of ____

framework classes

hover classes

wrapper classes

None of the above

0.5 points   

QUESTION 2

You can make a variable defined within a method be available outside that method by including the word public in that variable's declaration.

True

False

0.5 points   

QUESTION 3

A method that reads one of an object’s data items is called a mutator.

True

False

0.5 points   

QUESTION 4

What's the final value of x after the following code fragment is executed?

int x=1;

do{

x = x*2;

} while(x>=10);

8

16

2

None of the above

0.5 points   

QUESTION 5

Normally, you should use the private access modifier for class variables.

True

False

0.5 points   

QUESTION 6

Given a class with a class variable. All of the class's objects get a seperate copy of the class variable.

True

False

0.5 points   

QUESTION 7

For each class Java automatically provides a zero-parameter constructor that is always available unless you override it with an explicitly defined a zero-parameter constructor.

True

False

0.5 points   

QUESTION 8

When you pass a reference to a method, you enable the method to modify the referenced object.

True

False

0.5 points   

QUESTION 9

It's good practice to make constants as local as possible.

True

False

0.5 points   

QUESTION 10

A class constant should be initialized within a constructor.

True

False

0.5 points   

QUESTION 11

Given an array that's named myArray, you access the first element in the array using myArray(0).

True

False

0.5 points   

QUESTION 12

Method parameters persist for as long as the method is executing

True

False

0.5 points   

QUESTION 13

The least encapsulated type of variable is a class (or static) variable.

True

False

0.5 points   

QUESTION 14

The array object created with new automatically keeps track of the number of its elements that have been initialized.

True

False

0.5 points   

QUESTION 15

What is the name of the class that contains the abs, min, and round method?

Arithmetic

Math

Number

None of the above

0.5 points   

QUESTION 16

It's legal to store ints and also doubles in a single standard array.

True

False

0.5 points   

QUESTION 17

1.             If a method accesses a class variable If     If a method accesses a class variable and also an instance variable, the method:

Must be a local method

Must be an instance method

Must be a class method

Can be either a class method or an instance method – it depends on other factors.

0.5 points   

QUESTION 18

If the name of an argument in a method call is the same as the name of the corresponding parameter in the method's definition, changing that parameter's value inside the method also changes the value of the corresponding argument in the calling program.

True

False

0.5 points   

QUESTION 19

Typically, _______ modifier identifies a “helper” method.

private

public

static

all of the above

0.5 points   

QUESTION 20

Initially, you may include a main method in the same class as the code it drives, but if you want to drive that code later from a main method in a separate driver class, you must first remove the local main method.

True

False

0.5 points   

QUESTION 21

You should use static variables to represent properties of individual objects.

True

False

0.5 points   

QUESTION 22

Instance variables persist for as long as the object exists.

True

False

0.5 points   

QUESTION 23

Assigning one reference variable to another copies the right-side object's instance variables into the left-side object's instance variables.

True

False

0.5 points   

QUESTION 24

A class is a group of two or more objects.

True

False

framework classes

hover classes

wrapper classes

None of the above

Explanation / Answer

1.c)wrapper classes
2)True
3)False

4)2

5)True
6)True----object is instance of class
7)True----default constructor
8)false
9)True
10)True ---initialization process.if we use default constructor then we initialize variables
in that constructor
11)true---myArray[0]
12)false ---based on that access specifiers i.e,public or private like that
13)True
14)True
15)Math
16)False
17)must be instance method
19)private
21)false---static variable are share variables to objects
22)true

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote