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
Who was eqvtime tayaishvili?​
maks197457 [2]

Answer:

Image result for who was eqvtime takaishvili?​

Ekvtime Takaishvili (also spelled Taqaishvili) (Georgian: ექვთიმე თაყაიშვილი) (January 3, 1863 – February 21, 1953) was a Georgian historian, archaeologist and public benefactor was born January 3, 1863 in Likhauri  and died February 21, 1953

3 0
3 years ago
Read 2 more answers
A(n) _____ describes your core values and highest career goals. A. résumé B. objective statement C. qualifications profile D. pe
Juli2301 [7.4K]

Answer: D.) Personal Mission Statement

Explanation: The personal mission statement refers to a write up which is usually written by an individual and it's tailored to embody one's complete definition in terms of core values, skills, attributes and most importantly present and future desires, goals and objectives. The statement of purpose is usually detailed and will showcase where an individual is currently placed while also showcasing how he or she intends to achieve future aspiration.

8 0
3 years ago
Read 2 more answers
What acronym is used to reference the data link sublayer that identifies the network layer protocol encapsulated in the frame?
juin [17]

Logical Link Control is the data link sublayer that identifies the network layer protocol encapsulated in the frame. The acronym of Logical Link Control is LLC.

Therefore, the answer is LLC.

7 0
3 years ago
Saturn has an orbital period of 29.46 years
Alona [7]

This is true. I'm not sure what you're asking here, but if it's a true/false statement, it's true.

3 0
3 years ago
Read 2 more answers
An automated search feature used by search engines to find that match your search terms is called a spider or
9966 [12]

Answer

Crawler

Explanation

This is a program that go to various website to read their pages and content provided in order to form entries for a search engine index.All search engines have this program called spider or a bot. It acts as an automated script that browses through the internet to scan the web pages and find words contained in the pages and where the words are used.


5 0
3 years ago
Read 2 more answers
Other questions:
  • Which option organizes tasks based on importance?
    12·1 answer
  • A column letter above the grid, also called the ____, identifies each column.
    9·1 answer
  • Which are the benefits of leveraging web technologies?
    8·2 answers
  • "Create a Matlab Scrapt that will take the a Matrix A and Matrix B (of AX=B), then calculate the Determinant of Matrix A, Invers
    5·1 answer
  • The Internet may best be compared to a/an
    11·1 answer
  • Wireless networks use radio frequency (RF) or radio techniques, which allows wireless transmissions to reach out in all directio
    6·1 answer
  • Where do animators work?
    8·1 answer
  • Im lonellly whos down to date me
    7·2 answers
  • An instruction for the computer. Many commands put together to
    5·1 answer
  • unlike the barcode-based tracking system, a radio frequency identification system offers a .
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!