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
Ratling [72]
2 years ago
6

Write a public static method diagSum, which takes a 2d array of int values as a parameter, and returns the sum of the elements i

n the lead diagonal as an int value. The lead diagonal is defined as the diagonal line of values starting in the top left corner and proceeding one step right and down for each value until either the bottom or right edge of the array is reached. For example, in the array represented below, the numbers in red make up the lead diagonal
Computers and Technology
1 answer:
saveliy_v [14]2 years ago
6 0

A 2d array (i.e. 2 dimensional array) represents its elements in rows and columns

<h3>The program in Java</h3>

The method in Java, where comments are used to explain each line is as follows

//This defines the method

public static int diagSum(int[][] myArray) {

    //This initializes sum to 0

    int sum = 0;

    //This iterates through each row of the array

               for (int i = 0; i < myArray.length; i++) {

                   //This calculates the sum of the diagonals

                       sum+=myArray[i][i];

               }

               //This returns the sum

               return sum;

       }

Read more about methods at:

brainly.com/question/15969952

You might be interested in
*FREE POINTS* If you comment and follow me this will give up lot of points :p seriously I will follow u back if u do it :p​
Tom [10]

Answer:

yeetydcb muy sxg jkzxv jy d

Explanation:

yeet

3 0
3 years ago
Read 2 more answers
Who is katie and why is she deleting my answers
defon

Answer:

fr its so annoying when they delete your stuff when there is legit nothing wrong with the question

Explanation:

8 0
2 years ago
Read 2 more answers
Which MUD configuration is the most difficult to maintain
mihalych1998 [28]
This may be considered particularly appropriate since, due to the room-based nature of traditionalMUDs<span>, ranged combat is typically </span>difficult<span> to implement, resulting in </span>most MUDs<span> equipping characters mainly with close-combat weapons.</span>
6 0
3 years ago
Read 2 more answers
All of the following are true about in-database processing technology EXCEPT Group of answer choices it pushes the algorithms to
vekshin1

All of the aforementioned are true about in-database processing technology except: D. it is the same as in-memory storage technology.

<h3>What is an in-database processing technology?</h3>

An in-database processing technology can be defined as a type of database technology that is designed and developed to allow the processing of data to be performed within the database, especially by building an analytic logic into the database itself.

This ultimately implies that, an in-database processing technology is completely different from in-memory storage technology because this used for the storage of data.

Read more on database here: brainly.com/question/13179611

#SPJ1

5 0
2 years ago
When youre working with a word processing document and you press the Del key what happens
REY [17]
Typically, "Del" stands for "delete."
Most times, this key will do different things depending on the type of keyboard/computer you have. For example, on macs, the "delete" key is also the backspace key, so it will delete the last character you typed. However, on most pcs, the "delete" key will delete characters you typed that are in front of your cursor.
5 0
3 years ago
Other questions:
  • a computer that no longer works after having minor repair work done to it may have been damaged by ______.
    6·1 answer
  • The Springfork Amateur Golf Club has a tournament every weekend. The club president
    7·1 answer
  • Write a class for a Cat that is a subclass of Pet. In addition to a name and owner, a cat will have a breed and will say "meow"
    14·1 answer
  • __________ involves determining what qualities are to beused to perform project activities.
    9·1 answer
  • You view a portion of a document on the screen through a
    14·1 answer
  • Why is it important to be part of a team in times you fail and in times you succeed?​
    15·1 answer
  • Drag the correct type of update to its definition.
    13·1 answer
  • Mention five features on the desktop screen​
    5·1 answer
  • _______________ ________________ have human editors that evaluate, select, and organize websites into a hierarchy of categories.
    11·1 answer
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!