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
What is variable declaration in java ​
Airida [17]

Answer:

A variable declaration is a name given to a memory location. It is the basic unit of storage in a program.

8 0
3 years ago
Read 2 more answers
Fifty part-time students were asked how many courses they were taking this term. The (incomplete) results are shown below. Need
Ne4ueva [31]

Answer:

The answer for B is 10% and for C is 40%.

Explanation:

To get the percentage for B you take the the frequecy of students taking 2 courses (5) and multiply it by 100 then you divide it by whole number of students.

For C you do the after adding the number of students taking 1 or 2 courses (20).

5 0
3 years ago
On the server side, the database environment must be properly configured to respond to clients' requests in the fastest way poss
Paraphin [41]

Answer:

<em>DBMS Performance </em>

Explanation:

Database tuning <em>defines a range of activities that are used to maximize and homogenize a database's output.</em>

This typically coincides with query tuning, but applies to database file layout, DBMS software selection, and database environment setup (operating system, CPU).

Database tuning helps to optimize the use of machine resources in order to carry out work as efficiently and quickly as possible.

Many systems are built to handle their use of system resources, but there is still plenty of space for enhancing their performance by tailoring their server and DBMS settings and configuration.

5 0
3 years ago
How are network computers different from traditional personal computers? describe some usage scenarios in which it is advantageo
Elanso [62]
A network computer depend on on a centralized computer for most of its services. It can consequently have a minimal operating system while a personal computer on the other hand has to be proficient of on condition that all of the required functionality in a detached manner without depending on a centralized manner. Scenarios where administrative costs are high and where sharing leads to more efficient use of resources are exactly those settings where network computers are preferred.
8 0
3 years ago
Turns on her laptop and gets the error message "OS NOT FOUND." She checks the hard disk for damage or loose cable, but that is n
Serjik [45]
It needs an Operating System like a cable or something that will help it operate look for more and double check
3 0
3 years ago
Other questions:
  • Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playville has a playground to which
    6·1 answer
  • A windows computer is shared between several users, each with his own local user account. Each user has his own dedicated, uniqu
    9·1 answer
  • A job application is a form used to make a job request.<br> True<br> False
    8·2 answers
  • 3. You are a network administrator responsible for all network platforms and services. The Teta Company currently has only one b
    13·2 answers
  • How to deactivate the brainly account?​
    13·1 answer
  • The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
    14·1 answer
  • Que significa WWW en informática ._.​
    11·1 answer
  • The optical phenomenon that allows us to view rapidly changing still images as moving images is called _______.
    15·2 answers
  • can i get an access code for free online? if yes, what website is it so i can get a free access code?​
    15·1 answer
  • What causes the hidden node problem in a wireless local area network (wlan)?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!