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]
3 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]3 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
Piers wants to take a course on XML. He is a certified web designer, but he has not used XML before. How can he use XML to impro
PIT_PIT [208]

Answer:

Check Explanation (last paragraph, please).

Explanation:

The acronym "XML" simply stand for Extensible Markup Language and it is a programming language that is for coding infomation or data.

Extensible Markup Language(XML) is very acceptable and whenever one read or search a website that uses XML, it gives viewers good experience.

Piers can use XML to improve his website creations through the declaration of a namespace which has an integral part to a script element. The tags in XML does not have limitation like other languages. Also, Extensible Markup Language(XML) does not need to be updated all the time in as much as the website itself is being updated.

7 0
3 years ago
Match the characteristics to the mobile operating system that it describes.
uranmaximum [27]
I think it’s Apple ios
It’s definitely not Microsoft but my guess is Apple
3 0
3 years ago
How does abstraction make programming languages easier to use
alexgriva [62]

Abstraction make programming languages easier to use as  It eliminates the need for codes to be automated.

<h3>How does abstraction make programming languages easier to implement?</h3>

Data abstraction is known to be a tool that helps a person to change a complex data structure into simple ones which can be used easily.

Note that Abstraction make programming languages easier to use as  It eliminates the need for codes to be automated.

Learn more about abstraction from

brainly.com/question/7994244

#SPJ1

6 0
2 years ago
A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
Jobisdone [24]
An Address bus enables the cpu to communicate with a system's primary storage.
4 0
3 years ago
Which of the following is a step in paraphrasing? Skim the original information to get a sense of what it is about. Select a few
Sedaia [141]
Select a few key words to change to your own words
4 0
3 years ago
Read 2 more answers
Other questions:
  • Are there protections for people in terms of what data can be collected by different sites?
    10·1 answer
  • To create a chart you need to select at least ___ in a range of data
    15·1 answer
  • The process of saving files to disk is called.<br> A.read<br> B. Write<br> C. Lock<br> D. Protect
    6·1 answer
  • Who is responsible for customer service?
    14·1 answer
  • 50 POINTS!!!!
    8·1 answer
  • Mary is entering her senior year of college. She has a meeting on Friday with her advisor to discuss her career plans.Mary is al
    15·1 answer
  • What is one of the most effective security tools available for protecting users from external threats?
    15·1 answer
  • Code written by computer programmers is translated to binary code, so computers can understand the instructions. True or False
    7·1 answer
  • Which type of loan is based on financial need
    6·1 answer
  • ASAP BRAINLIEST!!!!!!
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!