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
alexandr402 [8]
3 years ago
5

Write the declaration statement for a two-dimensional array X of integers with five rows and five columns that accepts 25 intege

rs from the user.
Computers and Technology
1 answer:
madreJ [45]3 years ago
5 0

Answer:

int[ ][ ] X = new int[5][5];

It can also be declared and initialized this way:

  int[][] X = {

               {1,2,3,6,8},

               {4, 5, 6, 9},

               {7,5,6,8,9},

               {8,5,8,8,9},

               {10,2,6,8,11},

       };

Explanation:

Above is a declaration of a two-dimensional array that can hold 5*5=25 int values. A java program is given below:

public class JavaTwoD{

   public static void main(String args[ ]) {

       // creating the 5X5 array

       int[ ][ ] X = new int[5][5];

       // looping through the array to add elements

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

           for (int j = 0; j < X[i].length; j++) {

               X[i][j] = i * j;

           }

       }

You might be interested in
PLEASE HELP ME!!!!
White raven [17]
The answers are D and A
5 0
3 years ago
Read 2 more answers
Joseph wants to take out the color of the background wall from an image what can Joseph do to achieve this​
snow_lady [41]

Answer:

Go to remove a background website

Explanation:

6 0
2 years ago
Read 2 more answers
PLEASE HELP ASAP!!!!!!!!!!!
Bingel [31]

Answer:

True

Explanation:

3 0
2 years ago
Read 2 more answers
ethics and internal control are important applications in accounting . Provide FIVE code of ethics and five internal control mea
IceJOKER [234]
Ethics:
- to ensure that privacy will not be lost.
-ensuring personal information is not lost
-information in the accountings will not be submitted or shared with anyone
-information will be saved and viewed by the business.
- The business will not falsely make the accountings.
6 0
3 years ago
Consider the following methods:
elena55 [62]
3. 8.1  
Looking at the functions "average", and "mystery" it's pretty obvious that "average" returns a double precision average of the value of an integer array. The function "mystery" returns an array of integers with each value in the array being the length of the string in the array of strings passed to "mystery" in the same ordinal position.  
The main body of the code initializes an array of strings and then passes that array to "mystery" who's output is then passed into the function "average". Since the lengths of the words passed to "mystery" is 7, 5, 6, 10, 10, 8, 13, 6, 8, 8, the sum will be 81, so the average will be 81/10 = 8.1 which matches option "3".
4 0
3 years ago
Other questions:
  • Good participation in music is strictly limited to those who perform well. true or false
    13·2 answers
  • Which of the following statements is true?
    14·1 answer
  • Which approach to knowledge management capitalizes on tacit knowledge and requires heavy IT investment?
    7·1 answer
  • How do i do a class in java??
    5·1 answer
  • He made me so angry when he didn’t let me make my point that I had to stalk after him.
    5·2 answers
  • Can someone URGENTLY help me with my java code (I WILL GIVE BRAINLIEST)!? Ive been working on it for hours and its not working!
    12·1 answer
  • Write any one method to delete a table in writer​
    11·1 answer
  • The average American has 10 devices, ask for users average number of devices. Any number between 7 and 12 will print “you have a
    13·1 answer
  • Identify five type of application software​
    12·2 answers
  • What do you think entertainment or gaming platforms will look like in the future?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!