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
In fixed-width files, each record is on a separate line and the fields are separated by a special character.
Vesnalui [34]

Answer:

B. False.

Explanation:

Microsoft Access is a database application used to create and query existing database.

A fixed-width file in access is a file in which each record appears on a separate line and the width of each fields are consistent across records. This means a seven character field remains a seven character field from record one to the nth record.

So the field is a fixed-width file is not separated by a special character.

3 0
3 years ago
When using Microsoft word, what would happen to the text of a paragraph if the "Justify" option is used?
Bond [772]
Hello, and thank you for asking your question!

When you click on the 'Justify' option on any type of word pad, it'll make all lines of words perfectly aligned. Here is a quick few-sentence example I made. 
(Photo)

Hope this helps! ☺♥

3 0
3 years ago
In the context of this passage, which of the following is a synonym for alleged? A intended B claimed C denied D revealed
Zinaida [17]
B. Claimed

Alleged means somebody CLAIMED that you did something. So, you're being accused of doing something that you may have not done. I hope this helps! :)
7 0
3 years ago
What method of IP network configuration would you use for devices such as servers and printers so that all users on a network wi
kakasveta [241]

Answer:

Static IP allocation

Explanation:

Static IP allocation is the assigning of a fixed IP address to a device that can be shared on a network such as a server or a printer. With a static IP address, the printer or server can be reached any time by any user that is on the network, using the same IP address that was configured at initial setup. However, with a dynamic IP address, it means devices connecting to the printer or server have to be constantly configured to be able to connect to the printer or server, as the IP address is constantly changing,

3 0
3 years ago
Can someone please help me i don't need no one to explain it i just need the correct answer please.
Scilla [17]
90° because it is sent out the same angle when yo are getting reflected angle you add them both together.
6 0
3 years ago
Other questions:
  • If you sort by Last Name, Ascending, which of the following last names would come first in the list?
    11·2 answers
  • A computer that no longer works after having minor repair work done to it may have been damaged by ____
    13·2 answers
  • A child with suspected sleep apnea was given an apnea monitoring device to use over the next month. The device was capable of re
    6·1 answer
  • Sue needs to add a header and a footer to a presentation. Which process should she use to do this?
    10·2 answers
  • Which are the different areas where IT needs to be developed? And How?
    12·1 answer
  • Write a program that simulates rolling one die using the following steps: 1. Prompt the user for the number of sides on the die.
    13·1 answer
  • Write a programmer defined function that compares the ASCII sum of two strings. To compute the ASCII sum, you need to compute th
    6·1 answer
  • This question is related to linked-list representation of disjoint sets. Consider two sets Sx and Sy that have 3 and 5 elements,
    14·1 answer
  • What command can you use if you accidentally delete a sentence in your document?
    13·2 answers
  • The choice of database does not have any impact on the relevancy of search results?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!