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
KonstantinChe [14]
3 years ago
7

Rewrite each condition below in valid Java syntax (give a boolean expression): a. x > y > z b. x and y are both less than

0 c. neither x nor y is less than 0 d. x is equal to y but not equal to z
Computers and Technology
1 answer:
Natali5045456 [20]3 years ago
4 0

Answer:

The boolean expression is the expression which can be evaluated to true or false. This true/false is called boolean value. An if statement is used to check a condition which often contains the boolean expression which can either evaluate to true or false.

<h2>a. x > y > z </h2>

This line means that the value of variable x is greater than the value of variable y and the value of variable y is greater than the value of variable z.

This means:

                            x is greater than y AND y is greater than z

                                                     x > y AND y > z

in JAVA                                         x > y && y > z

using if statement                        if(x > y && y > z)

it can also be written as:       if (x > y && x > z && y >z)

<h2>b. x and y are both less than 0</h2>

This statement means that the value of variable x and the value of variable y are less than 0

This means:                                   (x AND y) = 0

in JAVA                                          (x&&y)==0

using if statement:                 if ((num&&hum)==0)

This can also be written as       x < 0 AND y < 0

 In JAVA                                         x  < 0 && y < 0

using if statement                       if (x < 0 && y < 0)

<h2>c. neither x nor y is less than 0</h2>

This statement means that neither the value of x variable nor the value of y variable is less than 0. This clearly means that the value of x and value of y both values are greater than or equal to 0.

this means:

                                                 x > = 0 AND y > = 0  

In JAVA                                      x > = 0 && y > = 0

Using if statement                     if(x > = 0 && y > = 0)

It can also be written as                    (x && y > = 0)

                                                         if(x && y > = 0)

<h2> d. x is equal to y but not equal to z</h2>

This statement means that the value of x is equal to the value of y but the value of x is not equal to the value of z.

This means

                                                         x = y but x ≠ z

                                                         x=y AND x≠z

In JAVA                                              x==y && x!=z

Using if statement                           if (x == y && x != z)

it can also be written as                    if (x == y && y != z)

If x is equal to y so this means that the value of x and y will be the same and both the values will not be equal to the value of z.

You might be interested in
Which button should be utilized if a user is unsure whether or not they are the right person to reply to an email?
Triss [41]

Answer:

its either a or c

Explanation:

7 0
3 years ago
Read 2 more answers
Estoy empezando a usar una pagina llamada source filmmaker, no se que apreté y quiero el menú de nuevo (en donde se ponen los mo
yuradex [85]

Answer:

hay un n t s en la esquina superior derecha, debe presionar eso y debe llevarlo al menú si eso no funciona, entonces tengo una idea de qué hacer

Explanation:

7 0
3 years ago
Most portable devices, and some computer monitors have a special steel bracket security slot built into the case, which can be u
Artemon [7]

Answer:

Instead of using a key or entering a code to open a door, a user can use an object, such as an ID badge, to identify themselves in order to gain access to a secure area. What term describes this type of object?

Explanation:

6 0
2 years ago
When creating a spreadsheet, there's no need to worry about design and how it will be organized; the program will take care of t
Rainbow [258]
False: a computer program do many things, but it can't read your mind. It doesn't know what kind of formatting you need for your spreadsheet. There are so many potential layouts of a spreadsheet, that the computer couldn't decide what to lay it out for you. Eventually the computer can see what you're trying to lay it out as and can help that way, but it needs to e started first. Having a uniform sheet that is well organized by you, is much easier to read than gobbledegook that has been spewed everywhere.

I hope this was helpful!
3 0
2 years ago
Read 2 more answers
1. I write about my travel experiences on my own personal ____?
alekssr [168]

Answer:

Hello There!!

Explanation:

1.blog

2.laptop

hope this helps,have a great day!!

~Pinky~

4 0
3 years ago
Other questions:
  • The _____ is the area in Microsoft Excel where you can perform file commands such as Save, Open, and Print
    15·1 answer
  • What is a common method for testing a spot weld?
    13·1 answer
  • Where should you click to edit an existing formula?
    12·2 answers
  • The decimal number 3 is ___ in binary the 2s column plus the 1s column.
    11·1 answer
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • Join zoom meet <br>id=547 458 9345<br>pw=sencHURI​
    8·2 answers
  • IPv4 and IPv6 are addresses used to identify computers on the Internet. Is this whether true or not:
    5·1 answer
  • What would be the effect if the register contained the following values 10011000
    12·2 answers
  • What is data intergrity​
    13·1 answer
  • Which web-authoring software enables users to create sophisticated web pages without knowing any html code?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!