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
harkovskaia [24]
3 years ago
13

What does this method do?

Computers and Technology
1 answer:
DIA [1.3K]3 years ago
8 0

COMPLETE QUESTION:

What does this method do?

public static int foo(String [][] a)

{

int b = 0;

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

{

b++;

}

return b;

}

Answer:

Returns the value of b which is the dimension of the array

Explanation:

The method foo accepts a multi dimension array and returns the dimension of the array. A complete code implementation and call to the method is given below:

<em>public class TestClass {</em>

<em>    public static void main(String[] args) {</em>

<em>    String [ ] [ ] arr = {{"gh","hj","fg", "re","tr"},{"","er","df","fgt", "tr"}};</em>

<em>        System.out.println(foo(arr));</em>

<em>    }</em>

<em>    public static int foo(String [ ][ ] a)</em>

<em>    {</em>

<em>        int b = 0;</em>

<em>        for (int i = 0; i<a.length; i++)</em>

<em>        {</em>

<em>            b++;</em>

<em>        }</em>

<em>        return b;</em>

<em>    }</em>

<em>}</em>

The output from the code snippet is the value of b which is 2

You might be interested in
Which of the following is NOT a recommended characteristic for incident objectives?A. Stated in broad terms to allow for flexibi
docker41 [41]

Answer:

A. Stated in broad terms to allow for flexibility.

Explanation:

Incident command are controls or directives needed in production or in an organization. A few characteristics not incident command objectives are, all projects and targets must be measurable and attainable, aii hand on board must function in accordance with the incident commander's authorities, and every finished project must meet company quality standards and deadlines. The incident commander's authorities are fixed for a particular sector and is rigid.

6 0
3 years ago
Can anyone answer this ​
Ivenika [448]

Answer:

I dont see the question

Explanation:

7 0
3 years ago
For a windows labtop what is the best way to save power when the computer will not be used for an extended period
rjkz [21]

Answer:

Put the Computer to sleep or hibernate Mood

Explanation:

The best way to save power when the computer will not be use for an extended period is to put the computer to sleep or hibernate mood depending on the OS (Operating System) you are using.

For instance in windows 10, all you need do is to Press the Windows key on the keyboard, then click on Sleep.

3 0
3 years ago
. What projects would Excel best be used for?
adoni [48]

Answer:

Projects that require spreadsheet organization and/or calculations between data

Explanation:

That is why Excel is a spreadsheet program

7 0
3 years ago
can you pls sub to my youttube channel, its called Yakobu, pls i will give you 30 points. pls dont just take points and not sub.
xxMikexx [17]

Answer:

Sure

Explanation:

I would love 2

5 0
3 years ago
Other questions:
  • When Python is running in the interactive mode and displaying the chevron prompt (&gt;&gt;&gt;) - what question is Python asking
    14·1 answer
  • Write an application that counts by five from 5 through 500 inclusive, and that starts a new line after every multiple of 50 (50
    13·1 answer
  • Tablets combine the features of which two types of devices?
    10·2 answers
  • When shading paragraphs, Word shades from the left margin to the right margin of the current paragraph. True or false?
    5·1 answer
  • Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
    13·2 answers
  • In the Remote Access Domain, if private data or confidential data is compromised remotely, you should set automatic blocking for
    15·1 answer
  • Name the character encoding standard that enables up to 128 different commonly used characters,
    8·1 answer
  • Question #3
    15·2 answers
  • Why do we use if statements?
    9·1 answer
  • Carl is beginning a digital forensic investigation. he has been sent into the field to collect a machine. when he arrives, he se
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!