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
jek_recluse [69]
2 years ago
6

Consider the classes below: public class TestA { public static void main(String[] args) { ​ int x = 2; ​ int y = 20 ​ int counte

r = 0; ​ for (int j = y % x; j < 100; j += (y / x)) { ​ counter++; ​ } } } public class TestB { public static void main(String[] args) { ​ int counter = 0; ​ for (int j = 10; j > 0; --j) { ​ ++counter; ​ } } } Which of the following statements is true?a. The value of j will be the same for each loop for all iterations b. The value of counter will be different at the end of each for loop for each class. c. Both A and B are true. d. Neither A nor B is true.
Computers and Technology
1 answer:
grigory [225]2 years ago
3 0

Answer:

The answer is "Option d".

Explanation:

In the given code, two class "TestA and TestB" is defined, that calculates some values which can be described as follows:

  • In class "TestA", three integer variable "x, y, and counter" is declared, that initializes with a value, that is "2, 20, and 0", inside the class for loop is declare that uses variable j which starts from and ends when the value of j is less than 100, it will increment the value of counter variable by 1.
  • In the class "TestB", an integer "counter" variable is initializes a value with 0, inside the class the for loop is used that uses variable j, which starts from 10, and ends when j is less than 0. in the loop it increments the value of "counter" variable by 1.  that's why in this question except "option d" all were wrong.

You might be interested in
True or false? LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to se
vfiekz [6]
<h2>Answer:</h2>

The following statement is TRUE.

LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to see where you stand as compared to your classmates in terms of your mastery of grammar and vocabulary concepts.

<h2>Explanation:</h2>

LearnSmart is an adaptive technology that is helping a lot of students by letting them judge which parts/topics of the book are not clearly learnt by them and which of them are under their grip.

LearnSmart provides cards with short term questions that make i possible for students to complete their preparation in short time. In addition to this smart flash card assignments are a to compare students preparation relatively.

<h3>I hope it will help you!</h3>
4 0
2 years ago
What is Deep learning
vodomira [7]

Answer:

Deep learning is an AI function that mimics the workings of the human brain in processing data for use in detecting objects, recognizing speech, translating languages, and making decisions. Deep learning AI is able to learn without human supervision, drawing from data that is both unstructured and unlabeled.

3 0
3 years ago
Renting provides _________ flexibility but can lead to _________ costs in the long-term.
docker41 [41]
Renting provides greater flexibility but can lead to higher costs in the long term.
3 0
3 years ago
Read 2 more answers
I need help please :((((<br> I need it in python
Bezzdna [24]
Take this one step at a time. Your teacher has given you the code for step 1. Now write step 2. Then 3, and so on.

For step 2: if you're using Python v2.x you'd use a line like

guess = int( raw_input( "Take another guess: " ) )

For Python v3.x it would be:

guess = int( input( "Take another guess: " ) )

Break it down into small pieces, it's not a complicated assignment.
7 0
3 years ago
Do these devices allow you to view photos using the cloud?
ivann1987 [24]

Answer:

Yes, You can view the cloud on those devices

8 0
2 years ago
Other questions:
  • suppose you need to verify how to correctly use commas. you pen your English textbook and scan the chapter titles in which one w
    15·1 answer
  • How to play music out of your apple watch?
    6·1 answer
  • Where does the term for a star network describe? A) a network for Department of Defense scientists to share data about the stars
    13·2 answers
  • When you hack a website, do you enter in the master code in the html section code data, or the offline/online system?
    14·1 answer
  • Question 1(Multiple Choice Worth 2 points)<br> Which of the following is true of a good photograph?
    10·2 answers
  • Rint "Censored" if userInput contains the word "darn", else print userInput. End with newline.
    11·1 answer
  • An optimal solution to a linear programming problem MUST lie A. somewere on the line between two corner points. B. somewhere out
    12·1 answer
  • Create a program named Reverse3 whose Main() method declares three integers named firstInt, middleInt, and lastInt. Assign the f
    9·1 answer
  • Banks use _____, which are electronic transmissions of account exchange information over private communications’ networks.
    14·1 answer
  • What is the purpose of a report?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!