1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gennadij [26K]
3 years ago
13

Consider the classes below:

Computers and Technology
1 answer:
jeka57 [31]3 years ago
7 0

Answer:

Hi!

The correct answer is d. Neither (a) nor (b) is true.

Explanation:

First, you have to know what the scripts intend to do, and they are counting from 1 to 10 in both cases.

Table of results of class TestA at end of each iteration:

[j = 0,  counter =  1]

[j = 10,  counter =  2]

[j = 20,  counter =  3]

[j = 30,  counter =  4]

[j = 40,  counter =  5]

[j = 50,  counter =  6]

[j = 60,  counter =  7]

[j = 70,  counter =  8]

[j = 80,  counter =  9]

[j = 90,  counter =  10]

Table of results of class TestB at end of each iteration:

[j = 10,  counter =  1]

[j = 9,  counter =  2]

[j = 8,  counter =  3]

[j = 7,  counter =  4]

[j = 6,  counter =  5]

[j = 5,  counter =  6]

[j = 4,  counter =  7]

[j = 3,  counter =  8]

[j = 2,  counter =  9]

[j = 1,  counter =  10]

That's why a) and b) are false.

Maybe you want to know why using pre increments on class TestB doesn't affect the loop. The reason is that when enters in a loop, first checks the test condition and takes the decision if true or false, and last executes the incrementation step.

You might be interested in
Which of the following variable declarations is a correct assignment?
Gwar [14]

Answer:

Option D: double y = 82;

Explanation:

In Java programming, it is acceptable to assign an integer (lower type) to a double type (higher type) variable. By assigning an integer to double type variable using the "=" operator, the integer will be converted to double type implicitly. It is known as the implicit type casting.  

For example, <em>double y = 82</em> will convert integer 82 (integer) to 82.0 (double).

6 0
3 years ago
Work with a partner to answer the following question: How might learning the language
AysviL [449]

Answer:

easy to learn is one similarity

longer experience needed is on difference

HOPE THIS HELPS .......

4 0
3 years ago
A(n) ________ is a text or image that allows the user to access that file or web page with a single click.
son4ous [18]
It would be called a link. Connection might work as well. 
5 0
3 years ago
Read 2 more answers
HELP PLEASE!!! Which development method is best explained in this way: a creation of a prototype model that will eventually be d
DerKrebs [107]

Answer:

Not sure but I think its Rapid Prototyping Method

4 0
3 years ago
Which of the following can you do under the fair use exceptions?
anzhelika [568]
What fair use exceptions are you talking about? There are thousands on fair use exceptions.
8 0
3 years ago
Other questions:
  • File formats are linked to certain programs.<br><br> True<br> False
    12·2 answers
  • Where should fire extinguishers be stored on a boat?
    7·1 answer
  • What must you do first in order to change the font type size and colour of a particular text
    13·2 answers
  • What are the best apps to learn coding
    15·2 answers
  • When u look at a green object through red glass the object will appear
    11·2 answers
  • One factor affecting digital camera quality is the number of pixels, measured in ____, used to store the data for each image.
    8·2 answers
  • Defining a(n) ______________ of an object is called instantiation.
    12·1 answer
  • _____emphasizes on proper breathing and the mind-body-spirit connections.​
    6·2 answers
  • James would like to send a document he has saved on the hard drive to coworkers in Ireland, Brazil, and India. These coworkers h
    6·2 answers
  • Digital Print Project
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!