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]
2 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]2 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
You have found statistics on the Internet that you would like to use in your speech.
miss Akunina [59]

Answer:

You cite them correctly and that the statistics are real.

Explanation:

5 0
3 years ago
Please answer this now I need please.
choli [55]

Answer:

You can change the color of text in your Word document. Select the text that you want to change. On the Home tab, in the Font group, choose the arrow next to Font Color, and then select a color.

You can display a graphics window and draw colorful shapes in it if you use the Show operation of the GraphicsWindow object. You can also specify properties of the graphics window, such as its title, height, width, and background color.

Explanation: Sorry I couldn't do the third question but hope it helps.

7 0
2 years ago
Small robots that can move around on the surface of a planet are called space shuttles.
PolarNik [594]

b:false because space shuttles orbit around a planet in outer space



3 0
3 years ago
Read 2 more answers
A ____________ would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a____________
Lynna [10]

Answer:

vulnerability, risk

Explanation:

A vulnerability would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a risk is a combination of the likelihood that such a misconfiguration could happen, a hacker’s exploitation of it, and the impact if the event occurred.

6 0
3 years ago
in the future, mobile technologies are expected to be used more than desktop computers today. what other improvements are helpin
vekshin1

The improvement that are helping support mobile computing is increase data storage online and more applications for mobile phone.

If the data storage capacity is increased, we will get a larger amount to store our files. We get more space to store our important files and access them as easily as possible. Mobile applications need to be improved, because with more applications we will find it easier to use these applications to help us do our work. With a larger number of data storage, we could be comfortable because data storage can increase your employees' flexibility by enabling them to access data anytime they want from any location.

Learn more about data storage online at brainly.com/question/13650923

#SPJ4

4 0
10 months ago
Other questions:
  • What is the central unit of the computer that contains the logic circuitry and carries out the instructions of the computer's pr
    13·1 answer
  • Which view In a presentation program displays you’re slides in full screen modes ?
    8·2 answers
  • Where is authorization management app on tablet?
    7·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I question 3<br> need correct the answers to all
    12·1 answer
  • What is the Matlab command to create a vector of the even whole numbers between 29 and 73?
    11·1 answer
  • ​open-source software is​ ________.
    11·1 answer
  • Designers and graphic artists can print finished publications on a color printer, take them to a professional printer, or post t
    15·1 answer
  • Create a method called letterGrade that will pass the student's average grade as a parameter and return a letter grade (char). O
    12·1 answer
  • If you want the input gear to spin in the same direction as the output gear you must use a _______ gear.
    13·1 answer
  • Catherine, a web designer, has created new content for a client's website. In order to update the company website, she needs to
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!