subject

1.consider the following code snippet:
int numaxles = 4;
string s = "number of axles is " + numaxles;

which of the following statements is correct?
answer

a. the
tostring()
method of the
object
class is being used to set the value of
s
.
b. the
tostring()
method of the
string
class is being used to set the value of
s
.
c. no
tostring()
method is being used to set the value of
s
.
d. this code will not compile.

2.which of the following statements about abstract classes is not true?

a. a class that inherits an abstract method and does not override it must be declared as abstract.
b. a class cannot be declared as abstract if it has no abstract methods.
c. you cannot instantiate an object from an abstract class.
d. you can construct a variable whose type is an abstract class.

3.an identifying value called a/an is assigned by the java runtime to an object when it is created, to allow the java runtime to tell objects apart.
answer

a. object identifier
b. uid
c. object code
d. hash code

4.the dual use of the
super
keyword is analogous to the dual use of the keyword.
answer

a. final
b. instanceof
c. this
d. abstract
5.when designing a hierarchy of classes, features and behaviors that are common to all classes are placed in
answer

a. every class in the hierarchy
b. the superclass
c. a single subclass
d. all subclasses

6.consider the following code snippet:
auto consumerauto = new auto (4, "gasoline");
string s = consumerauto. tostring();

assume that the
auto
class has not implemented its own
tostring()
method. what value will
s
contain when this code is executed?
answer

a. s
will contain the values of the instance variables in
consumerauto
.
b. s
will contain only the name of the
consumerauto
object.
c. s
will contain the name of the
consumerauto
object followed by a hash code.
d. this code will not compile.

7.which of the following is true regarding inheritance?
answer

a. when creating a subclass, all methods of the superclass must be overridden.
b. when creating a subclass, no methods of a superclass can be overridden.
c. a superclass can force a programmer to override a method in any subclass it creates.
d. a superclass cannot force a programmer to override a method in any subclass it creates.

8.
which of the following statements is true regarding the bank account classes presented in the textbook?
answer

a. the
checkingaccount
class uses the same
deposit
method as its superclass.
b. the
checkingaccount
class uses the same
withdraw
method as its superclass..
c. the
checkingaccount
class uses the same
getbalance
method as its superclass..
d. the
checkingaccount
class uses the same
deductfees
method as its superclass..

9.which of the following statements about classes is not true?
answer

a. every class extends the
object
class either directly or indirectly.
b. only classes with an explicit
extends
clause extend the
object
class.
c. the
object
class is the direct or indirect superclass of every class in java.
d. the
object
class is the direct superclass of every class that does not have an explicit
extends
clause.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:30
1. which of the following is a search engine? a) mozilla firefox b)internet explorer c)google d)safari 2. which of the following statements is true? a) all search engines will provide the same results when you enter the same query. b) all search engines use the same amount of advertisements. c) some search engines are also browsers. d) search engines often provide different results, even when you enter the same query.
Answers: 2
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
The database design steps are listed below in the incorrect order. choose the correct order number next to each step. determine the information to be stored in the database. determine the fields needed to record the data determine if there will be any repetition of data entered, and separate the fields into tables to normalize the data. create relationships to connect the tables.
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
Ideally, the backrest is tilted back slightly, so when you turn the wheel your shoulders are the seat.
Answers: 2
You know the right answer?
1.consider the following code snippet:
int numaxles = 4;
string s = "number of axles i...
Questions
question
Mathematics, 29.01.2020 05:40
question
Mathematics, 29.01.2020 05:40
question
Mathematics, 29.01.2020 05:40
question
Mathematics, 29.01.2020 05:40
Questions on the website: 13722367