Computer Science, asked by dishabhadra4, 9 hours ago

write equivalent Java expression:d=√1³+b³​

Answers

Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
2

Answer:

  • d = math.sqrt( math.pow (1 , 3)) + math.pow (b , 3)

Explanation:

  • In the first condition of (√1³) we would be using math.sqrt method and math.pow method. math.sqrt method is being used because sqrt of a double value is being returned. Whereas, math.pow method is being used because the first argument that is 1 is raised to the power 3.
  • In the second condition of (b³) we have used math.pow method because the first argument that is b is raised to the power 3.

Additional Information:

  • Method is a named block of a códe in a class. It is executed within a defined set of instructions.
  • Methods and variables of math class are defined as static members.
  • Java.lang package contains classes and interfaces which are fundamental to Java programming language.
  • The math class of java.lang package contains generic mathematical functions including some geometric and trigonometric function.
  • Math.cbrt returns cube root of a double value.
  • Math.ceil returns smallest integer which is greater or equal to the argument.
  • Math.abs returns us the absolute value of a given argument.
  • Math.pow it returns us the value of a first given argument raised to the power of the given second argument.
  • Double datatype is used if a output comes in decimal.

More similar questions:

https://brainly.in/question/42140095?

https://brainly.in/question/30816677?

https://brainly.in/question/18010374?

https://brainly.in/question/44313763?

Similar questions