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

What method of the Math object can be used to return the largest value from the values that are passed to it?

Computers and Technology
1 answer:
miss Akunina [59]3 years ago
7 0

Answer:

the Math.max() method

Explanation:

The java.lang.* package contains all the essential components needed for a JAVA program which involves numbers and all the operations done on the numericals.

The java.lang.math class contains all the methods needed to perform mathematical operations on numerical values.

All the methods in the question are discussed below with examples.  

Math.max() method

java.lang.Math.max(double/ int/ float a, double/ int/ float b)

This method returns the highest value from among the parameters passed to it.

The syntax for the above is  

Numbers can be integers, float and double or long. The return type is the same as the parameters.

Two values to be compared are passed as arguments and the higher value of them is returned.

This function also accepts negative integers as parameters.

Math.max(-9, -2);

Gives -2 as the output.

Math.max(0.34, 0.45)

Gives 0.45 as the output.

Math.ceil() method

java.lang.Math.ceil(double/ int/ float a)  

This method returns the nearest greater whole number for the given number.

Integer parameter returns an integer number.

Math.ceil(7);

Gives 7 as the output.

Decimal number will return the nearest higher integer.

Math.ceil(8.7);

Gives 9.0 as the output.

Math.ceil(-0.34)

Gives -0 as the output.

Math.pow() method

java.lang.Math.pow(double/ float/ int a, double/ float/ int b)

The above method returns the result of a raise to the power of b.

The first parameter is the base while the second parameter forms the exponent.

Math.pow( 2.3,  4.5 );

This calculates (2.3)^4.5.

Gives 42.44‬ as the output.

Math.pow( 2, 3 );

This calculates the value of 2^3.

Gives 8 as the output.

Math.abs() method  

java.lang.Math.abs(double a)

This method returns non-negative value of the numerical parameter passed to it. Absolute of a number does not changes its value but changes the sign of a negative number. It returns the positive or negation of the negative input number.

Math.abs(-0.1234)

Gives 0.1234 as the output.

Math.abs(12.34)

Gives 12.34 as the output.

These methods require java.lang.Math to be imported in the program.

You might be interested in
Question # 6
insens350 [35]

Answer:

April 30, 1993

Explanation:

On April 30, 1993, four years after publishing a proposal for “an idea of linked information systems,” computer scientist Tim Berners-Lee released the source code for the world’s first web browser and editor.

4 0
2 years ago
Who share the road with an impaired driver are at risk
bonufazy [111]
All drivers

All drivers who share the road with an impaired driver are at risk.
8 0
3 years ago
Read 2 more answers
Design a generic post-implementation evaluation form. The form should consist of questions that you could use to evaluate any in
irina1246 [14]

Answer:

Project Identification

Provide the identifying information associated with the project, including the applicable project control code, system acronym, and system title.

System Proponent

Provide the name of the System Proponent.

History of the System

Briefly describe the system’s history and predecessor, if any.  State the mission needs and information requirements, including how the system is expected to help users.

Functional System Description and Data Usage

Briefly describe what the system does functionally and how the data are used by the system.

Explanation:

Overview

The Post-Implementation Review is used to evaluate the effectiveness of the system development after the system has been in production for a period of time (normally 6 months).  The objectives are to determine if the system does what it is designed to do: Does it support the user as required in an effective and efficient manner? The review should assess how successful the system is in terms of functionality, performance, and cost versus benefits, as well as assess the effectiveness of the life-cycle development activities that produced the system.  The review results can be used to strengthen the system as well as system development procedures.

The review is scheduled to follow the release of a system or system revision by an appropriate amount of time to allow determination of the effectiveness of the system.  A representative from the functional development group or other member of the major user organization participates in the review.  The System Proponent ensures that all documentation and all personnel needed to participate in the review are accessible.

The reviewer and an assigned team collect the information needed for the Post-Implementation Review by interviewing end users and their managers, system administrators, and computer operations personnel.  The report is then prepared and provided to the user organization that requested it and the information systems organization, which may jointly use the findings to initiate other actions.

The Post-Implementation Review is a free-form report, and not all sections are relevant or necessary to the final product.  A description of the Post-Implementation Review Report is attached.

3 0
3 years ago
Question is attached as image, please help :>
harkovskaia [24]

Answer:

Proved

Explanation:

Given

X = (a.\bar b)+(\bar a.b)

(a + b)\ .  \frac{}{a.b}

Required

Find out why they represent the same

To do this, we simplify either (a + b)\ .  \frac{}{a.b} or X = (a.\bar b)+(\bar a.b)

In this question, I will simplify (a + b)\ .  \frac{}{a.b}

Apply de morgan's law

(a + b)\ .  \frac{}{a.b} = (a + b) . (\bar a + \bar b)

Apply distribution property

(a + b)\ .  \frac{}{a.b} = a.\bar a + a.\bar b + \bar a . b + b . \bar b

To simplify, we apply the following rules:

a.\bar a = 0 --- Inverse law

b.\bar b = 0 --- Inverse law

So, the expression becomes

(a + b)\ .  \frac{}{a.b} = 0 + a.\bar b + \bar a.b + 0

(a + b)\ .  \frac{}{a.b}  = a.\bar b + \bar a.b

Rewrite as:

(a + b)\ .  \frac{}{a.b}  = (a.\bar b)+(\bar a.b)

From the given parameters:

X = (a.\bar b)+(\bar a.b)

This implies that:

(a + b)\ .  \frac{}{a.b} when simplified is X or (a.\bar b)+(\bar a.b)

3 0
2 years ago
Imagine that a you and a friend are exercising together at a gym. Your friend suddenly trips and falls, and it is clear that he
ladessa [460]

Answer:

The sprain happened when the friend fell and the ligaments (in the ankle)  stretched, twisted or possibly tore. Sprain is manifested by pain, swelling, bruising and inability to move.

Explanation:

Here the appropriate steps to stabilize the injury:

1.       Call for help.

2.       Rest the injured area to avoid further damage.

3.       Put ice ( for 15 to 20 minutes) to help limit the swelling.

4.       Apply compression bandage to prevent more swelling.

5.       Elevate the injured ankle above the heart to limit swelling.

Hope this helps UvU

4 0
2 years ago
Other questions:
  • A(n) _____ is a fake online persona created to promote a particular point of view, often in praise of a firm, product, or indivi
    15·1 answer
  • Which occupation requires certification by the state?
    15·2 answers
  • An example of live footage is when?
    10·2 answers
  • ICT excel data homework
    10·1 answer
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • Which industry has the highest employment figure for both teen and young adults in July, 2014?
    6·1 answer
  • You're setting up some VMs to test an application you're considering making available to employees of the small company you work
    11·1 answer
  • Write a program which populates an array with integer values read from a file. We do not know how many integers are in the file,
    8·1 answer
  • 3. Which of the following is called address operator?<br> a)*<br> b) &amp;<br> c).<br> d) %
    12·1 answer
  • Corey set up his presentation for delivery to his team.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!