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
sergey [27]
3 years ago
11

What is wrong, logically, with the following code? if (x > 10) System.out.println("Large"); else if (x > 6 && x &l

t;= 10) System.out.println("Medium"); else if (x > 3 && x <= 6) System.out.println("Small"); else System.out.println("Very small");
Computers and Technology
1 answer:
Alex73 [517]3 years ago
8 0

Answer:

The above code will hold the second condition with && operator, like "x<=6" or"x<=10" condition in the else if statement which is of no use.

Explanation:

  • The above code holds a condition-based statement by the help of if-else statement where--
  • The first if-condition will states true when the value of x will be greater than 10, So the if-else condition will be tested for that value of x which is less than or equal to 10.
  • So there is no needs to justify the " x <= 10" for else if statement and " x <= 6" for the second else if statement because the second else if statement will be tasted when the value of x will be less than or equal to 6.
You might be interested in
I would A lot of knowledge and education for computers and <br> Technology
borishaifa [10]

Answer:

Pay attention in your class.

Explanation:

If you paid attention in your class, you would have at least a basic understanding of the material.

7 0
3 years ago
Read 2 more answers
What is the relationship between ionic bonds and cleavage
Marrrta [24]
Hello there!

The relationship between ionic bonds and cleavage is: As the ionic bond strength increases, cleavage will be more difficult. 

Minerals are held together generally by ionic bonds. Ionic bonds are the result of electrostatic attraction and electron transfer between positive and negative ions (cations and anions). Ionic bonding implies the formation of ordered crystalline solids and the cleavage of those solids will depend on the strength of this bonding. 
7 0
3 years ago
When a computer or digital device is used as a storage device or in the facilitation of an offense, it is argued to be ____ to t
Katen [24]

Answer:

Incidental.

Explanation:

When a computer or digital device is used as a storage device or in the facilitation of an offense, it is argued to be incidental to the offense.

For instance, the list of customers used by human traffickers is considered to be generated through an incidental system.

8 0
2 years ago
Which of the following should NOT be done to keep people from slipping on floors? A) Have the proper absorbents in an easy-to-fi
RoseWind [281]

The following options helps keep people from slipping on floors

A) Have the proper absorbents in an easy-to-find place to quickly put on spills : So that accidental little spills can be cleaned right away.

C) Wear slip-resistant footwear : It is a precautionary step to follow, no matter where we go.

D) Mark a slippery area with an easy-to-use tent sign that says " Caution, Slippery floor" : This allows people to be aware of the wet area and cross it cautiously.

Leaving oil and fluids to air dry thoroughly, takes a long time and there are chances that people step over it and slip.

So, the answer is

(B) Anytime oil or fluids are spilled on the floor, leave them to thoroughly air dry.

8 0
3 years ago
Read 2 more answers
One reason to buy a home instead of rent a home is:
vazorg [7]
A is the correct Answer

7 0
3 years ago
Other questions:
  • When sociologists say that it is difficult to predict all the results of social change, what are they referring to?
    5·1 answer
  • What would be some long- term goals.
    11·1 answer
  • A report formatted where the page is taller than it is wide is formatted in ____.
    12·1 answer
  • I have a question on an IT crossword the question is as follows
    12·1 answer
  • To change the way a slide moves from one slide to the next, what tab should be selected?
    12·1 answer
  • Explain the concept of conditional formatting​
    9·1 answer
  • Each drop-down menu.
    8·1 answer
  • Which type of measurement would you use to determine the mass of sugar?
    12·1 answer
  • The _________________ creates international guiding principles for computer forensic examiners.
    13·1 answer
  • a company recently implemented a secure sockets layer/transport layer security (ssl/tls) version that supports secure hashing al
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!