Question

These are basic to Java9 expressions that just need to be evaluated to their simplest form....

These are basic to Java9 expressions that just need to be evaluated to their simplest form. I got these ones wrong and just wanted to get some input as to why. Thank you for the assistance!

Evaluate the following expressions:

( ((10*5)+6/3)==(10*5)+(6/3) || true != 5>4)

4+3*80+"Hello" +4*9+45/2

!(!((3.5+1.0) >(9/2))&&(12%4==3) )

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

1)
(((10*5)+6/3)==(10*5)+(6/3) || true != 5>4)
=>  ((50+6/3)==(10*5)+(6/3) || true != 5>4)
=>  ((50+2)==(10*5)+(6/3) || true != 5>4)
=>  (52==50+2 || true != 5>4)
=>  (52==52 || true != 5>4)
=>  true || true != true
=>  true || false
=>  true
Answer: true

2)
4+3*80+"Hello" +4*9+45/2
=>  4+240+"Hello" +36+22
=>  244+"Hello"+36+22
=>  "244Hello"+36+22
=>  "244Hello36"+22
=>  "244Hello3622"
Answer: 244Hello3622

3)
!(!((3.5+1.0) >(9/2))&&(12%4==3) )
=>  !(!(4.5 >4)&&(0==3))
=>  !(!(true)&&false)
=>  !(false&&false)
=>  !false
=>  true
Answer: true



Please let me know if you have any doubts Please upvote this answer. Thanks!!

Add a comment
Know the answer?
Add Answer to:
These are basic to Java9 expressions that just need to be evaluated to their simplest form....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Evaluate the Boolean expressions to determine if they are TRUE or FALSE. (5 % 3 ==...

    Evaluate the Boolean expressions to determine if they are TRUE or FALSE. (5 % 3 == 9 / 4) ____________________ (3 <= 3) ____________________ (15 > 10) ____________________ ( (6 + 0.5) > (34 / 5) ) ____________________ ( 8 != 8 / 10) ____________________ (8 > 4 && 3 < 2) ____________________ (5 <= 3 || 4 > -23)

  • I need help with this program. It is in Irvine MASM Assembly Language. You are to...

    I need help with this program. It is in Irvine MASM Assembly Language. You are to write a program to compute the results of a postfix expression. The expression has the format operand operand operator   where the operator can be +, -, *. You must use a stack to evaluate the expressions. (The system Stack will not work.) Print out the input expression and the results of the evaluation. Read the data from a file and output to a file....

  • 1. Evaluate the following expressions if p = 8, 9 = 3, and the value of...

    1. Evaluate the following expressions if p = 8, 9 = 3, and the value of the variable found is False. Show your work. . q <= p . not (p == 4-5) . q != p % 5 . found or p > 5 and q == p + 5 2. Are you able to draw the truth tables for AND, OR, and NOT logical expressions? - Translate the following problem descriptions into Python. 3. If score is greater...

  • EVALUATING GENERAL INFIX EXPRESSIONS INTRODUCTION The notation in which we usually write arithmetic expressions is called infix notation;...

    EVALUATING GENERAL INFIX EXPRESSIONS INTRODUCTION The notation in which we usually write arithmetic expressions is called infix notation; in it, operators are written between their operands: X + Y. Such expressions can be ambiguous; do we add or multiply first in the expression 5 + 3 * 2? Parentheses and rules of precedence and association clarify such ambiguities: multiplication and division take precedence over addition and subtraction, and operators associate from left to right. This project implements and exercises a stack-based algorithm that evaluates...

  • #1. Operators and values, expressions Please correct the following code to make it print the given...

    #1. Operators and values, expressions Please correct the following code to make it print the given expressions and their answers well (3pts). public class DataTypes {    public static void main(String[] args) {       System.out.println("5*8/6 = " + 5*8/6);       System.out.println("(2*6)+(4*4)+10 = " + (2*6)+(4*4)+10);       System.out.println("6 / 2 + 7 / 3 = " + 6 / 2 + 7 / 3);       System.out.println("6 * 7 % 4 = " + 6 * 7 % 4 );       System.out.println("22 + 4 * 2 = "...

  • GUIDED PRACTICE See Example Solve. Write each answer in simplest form. L 1. a-1 = 1...

    GUIDED PRACTICE See Example Solve. Write each answer in simplest form. L 1. a-1 = 1 2. m+ See Example 2 4. = 8 3. p-}= 1 6. 3w= See Example 3 7. Kara has cup less oatmeal than she needs for a cookie recipe. If she ha cup of oatmeal, how much oatmeal does she need? See Example 1 INDEPENDENT PRACTICE Solve. Write each answer in simplest form. 8. n- 12. h + 1 = 10 14. $x =...

  • Matlab code assistance - task 1 and 6 I think I am right and just need...

    Matlab code assistance - task 1 and 6 I think I am right and just need to be pointed in the right direction if I should change anything %% Task 1 % create the 3 row vectors shown in Ex 8 using 3 different approaches Ex 8 = using the colon operator and also the linspace function, create the following row vectors -5 -4 -3 -2 -1 5 7 9 8 6 4 % 1. list the values explicitly (square...

  • In its most basic form, the game of craps is played observes the sum of the...

    In its most basic form, the game of craps is played observes the sum of the two sides turned up. If this sum is 7 or 11, the player wins immediately 2, 3, or 12, the player loses immediately Otherwise, if this sum is any other number (4, 5, 6, 8, 9, or 10), that number becomes the player's "point. as follows. A player rolls two dice and Build an Excel model for the game. The part of the model...

  • i just need help with the columns to the right that are blank. i just need...

    i just need help with the columns to the right that are blank. i just need to know the process of how to do them. thanks 5 125 resistance [0] resistance [0] using Voltage using Voltage and current and power resistance [0] using current and power Voltage [V] 3 Vol 11 4 Battery internal resistance [0] 5 Power of one 50 light [W] 6 7 Voll 8 Run 1 9 Resistor 1 [Q] 10 10 11 20 12 30 13...

  • Write each ratio or rate in simplest form. 27 to 36 1. 1. Math 2. Math...

    Write each ratio or rate in simplest form. 27 to 36 1. 1. Math 2. Math 10 yards to 75 yards 2. 234 miles on 9 gallons of gas 3. 3. Math Find the unit rate. 4. 134 feet in 5 seconds Math 4. 9. Solve. 9. If you can buy 25 pounds of dog food for $7.25 or 40 pounds for $11.20, which would be the better buy? Math 10. 10. The original cost of an Acura SUV was...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT