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
Leno4ka [110]
3 years ago
10

java The maximum-valued element of an integer-valued array can be recursively calculated as follows: If the array has a single e

lement, that is its maximum (note that a zero-sized array has no maximum) Otherwise, compare the first element with the maximum of the rest of the array-- whichever is larger is the maximum value. Write an int method named max that accepts an integer array, and the number of elements in the array and returns the largest value in the array. Assume the array has at least one element.
Computers and Technology
1 answer:
adoni [48]3 years ago
7 0

Answer:

see explaination

Explanation:

MaxArray.java

public class MaxArray{

public static void main(String[] args) {

int a[] = {1,2,5,4,3};

int max = max (a, 5);

System.out.println("Max value is "+max);

}

public static int max (int a[],int size){

if (size > 0) {

return Math.max(a[size-1], max(a, size-1));

} else {

return a[0];

}

}

}

Output:

MaxArray

You might be interested in
Convert 4.5 strides to girth
n200080 [17]

There are 0.5 strides in one girth
so 4.5 strides will be equal to 9 girth
hope it helps
3 0
3 years ago
(true or false) fortnite is the best?
GarryVolchara [31]

Answer:

FALSE ZzZzZzZz

Explanation:

Cus it is PERIOT

7 0
3 years ago
Read 2 more answers
What log file contains information and error messages regarding network access generated by daemons such as ssd and xinetd?
ehidna [41]

Answer:

The correct answer to the following question will be "Secure".

Explanation:

This file includes information about the rights of verification and authorization.

  • It will be used primarily for monitoring the use of authorization schemes.
  • It holds all communications related to safety like faults in encryption.
  • This also monitors sshd logins, logins of SSH, as well as other system security resources daemon-logged failures.

So, it's the right answer.

3 0
3 years ago
Which of the following acts as the central authority in the network?
kiruha [24]

Answer:

Server

Explanation:

i know it will be server

4 0
3 years ago
A dmz is a subnet of _____________ accessible servers placed outside the internal network.
Alborosie

A dmz is a subnet of publicly accessible servers placed outside the internal network. Any service provided to users on the public internet should be placed in the DMZ network. DMZ means demilitarized zone (perimeter network) .

7 0
3 years ago
Other questions:
  • The first screen you see when you open word2016 what is called?​
    5·2 answers
  • How i can download play store?​
    10·1 answer
  • Henry is studying the effects of deforestation along the slopes of hills and mountains. He wants to take a photo of a mountain s
    14·1 answer
  • Brainliest to whoever answers this first, i need help explaining.
    8·1 answer
  • To implement a small database, a database designer must know the "1" and the "M" sides of each relationship and whether the rela
    13·1 answer
  • landon starts his computer and gets message, hard drive is not found. He was watching a movie the previous night, what might the
    6·1 answer
  • If somebody is using a laptop at a coffee shop, how are they likely connected to a network?
    11·1 answer
  • 4. Write technical term for the following statements
    15·2 answers
  • In critical thinking, an argument is:
    12·2 answers
  • What does input allow a computer to do
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!