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
Lera25 [3.4K]
3 years ago
9

Which of the following are valid calls to Math.max? 1. Math.max(1,4) 2. Math.max(2.3, 5) 3. Math.max(1, 3, 5, 7) 4. Math.max(-1.

5, -2.8f) A. 1, 2 and 4 B. 2, 3 and 4 C. 1, 2 and 3 D. 3 and 4
Computers and Technology
1 answer:
stiv31 [10]3 years ago
8 0

Answer:

1, 2 and 4

Explanation:

the Math.max() is the function in java which is used to compare the two values and it gives the maximum of two values.

it take only two argument and the data type can be int, float etc.

Math.max(1,4): it takes two int values and give the output 4. it is valid call.

Math.max(2.3, 5): it takes two values and give the output 5.0. it is valid call.

Math.max(1, 3, 5, 7): it takes 4 values which is wrong because function takes only two variables. it is not valid call.

Math.max(-1.5, -2.8f): it takes two values and give the output -1.5. it is valid call.

You might be interested in
A technician is building a workstation that is to be used as an HTPC and will sit next to the audio receiver. Which of the follo
loris [4]

Answer:

B, Mini-ITX

Explanation:

According to my research on information technology and it's hardware, I can say that based on the information provided within the question the technician is most likely to use a Mini-ITX case. This is because an HTPC is a A Home Theater PC which does not need all the hardware that a regular PC needs, just the minimum specs, and these devices are usually hidden away in a drawer or behind the TV. Therefore he needs the smallest PC case which is a Mini-ITX.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
2 years ago
What are the two types of cache memory?
alexandr402 [8]

Answer:

DRAM and SRAM

Explanation:

Cache memory is used to reduce the average time to access data from the Main memory.

SRAM is an on-chip memory whose access time is small (fast).

DRAM is an off-chip memory which has a large access time (slow).

4 0
3 years ago
1. Realizați o schemă logică pentru un algoritm care sa calculeze suma primelor
DIA [1.3K]

Explanation:

The clear rendering reads;

"1. Make a logic diagram for an algorithm to calculate the sum of premiums 100 natural numbers.

2. Make a logic diagram that displays a maximum of 2 natural numbers.

3. Make a logic diagram that displays the square of a natural number".

4 0
3 years ago
Write a well-commented Java program that answers the following questions in complete sentences such that the reader does not hav
pickupchik [31]

Answer:

import java.util.Scanner;

import javax.swing.JOptionPane;

public class labExercise1

{

public static void main(String[] args)

{

int sum= 0;

double interestRate = 5.0;

double monthlyPayment=0;

double totalPayment=0;

String input = JOptionPane.showInputDialog(null,"Enter the loan amount: ($)","Lab Exercise 1", 2);

double loanAmount = Double.parseDouble(input);

String input1 = JOptionPane.showInputDialog(null,"Enter the loan period(years):","Lab Exercise 1",2);

double numberOfYears = Double.parseDouble(input1);

JOptionPane.showConfirmDialog(null,"The loan amount is $" + loanAmount + ", and the loan duration is " + numberOfYears + "year(s). Continue?","Lab Exercise 1",2);

String s1 = null;

System.out.print("Interest Rate(%) Monthly Payment($) Total Payment($) ");

s1 = "Interest Rate(%) Monthly Payment($) Total Payment($) ";

while (interestRate <= 8.0)

{

double monthlyInterestRate = interestRate / 1200;

monthlyPayment= loanAmount * monthlyInterestRate / (1 - 1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12));

totalPayment = monthlyPayment * numberOfYears * 12;

s1 = s1 + String.format("%.3f%30.2f %40.2f ",interestRate, monthlyPayment, totalPayment) + " ";

System.out.println(s1);

interestRate = interestRate + 1.0 / 8;

}

//s1 = String.format("%16.3f%19.2f%19.2f ",interestRate, monthlyPayment, totalPayment);

System.out.println(s1);

JOptionPane.showMessageDialog(null,s1,"Lab Exercise 1",3);

}

}

Explanation:

  • Take the loan amount and period as inputs from the user.
  • Calculate the monthly interest rate by dividing the interest rate with 1200.
  • Calculate total payment using the following the formula:
  • totalPayment = monthlyPayment * numberOfYears * 12;
6 0
3 years ago
Question text<br> In a spreadsheet program, worksheets and documents are present in
olasank [31]

Answer:

workbook

Explanation:

A workbook is a file that contains one or more worksheets to help you organize data.

4 0
3 years ago
Other questions:
  • Can someone help me with...A table can help? PLEASE
    8·1 answer
  • When a computer is booted the checks the computer's components?
    7·1 answer
  • You have dinner with your family and tell them that you have taken bcis. your mother tells you that she is proud of you and that
    9·1 answer
  • 1. Actuators apply mechanical force in the form of pressure to overcome
    10·1 answer
  • What aspect should you consider before adding pictures to a document?
    8·2 answers
  • 3.19 LAB: Seasons In C++ Write a program that takes a date as input and outputs the date's season. The input is a string to repr
    15·1 answer
  • List the components of a typical operating system and summarize the role of each in a single phrase.
    6·1 answer
  • List three ways of breaking a copyright law with the illegal copy of software.​
    11·1 answer
  • One of the benefits of holding an investment for over a year rather than selling it in less than a year is that the
    14·2 answers
  • Write a Python program that uses three variables. The variables in your program
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!