Question

In: Computer Science

Write a program which shows how two-dimensional arrays which contain multiple copies of your id number...

Write a program which shows how two-dimensional arrays which contain multiple copies of your id number and age are passed to methods. Explain in your own words each method and class used in the program.

Solutions

Expert Solution

public class Main
{
   public static void main(String[] args) {
       int[][] array={{1,2,3,4,5},{10,20,30,40,50}};
       parameter(array);
   }
  
   static void parameter(int[][] array)
   {
   System.out.println("ID \t AGE");
   for(int i=0;i<array[0].length;i++)
   {
   System.out.println(array[0][i]+"\t"+array[1][i]);
   }
   }
}


Related Solutions

Write a program which shows how two-dimensional arrays which contain multiple copies of your id number...
Write a program which shows how two-dimensional arrays which contain multiple copies of your id number and age are passed to methods. Explain in your own words each method and class used in the program. My id number is 12133149
Write C program Multidimensional Arrays Design a program which uses two two-dimensional arrays as follows: an...
Write C program Multidimensional Arrays Design a program which uses two two-dimensional arrays as follows: an array which can store up to 50 student names where a name is up to 25 characters long an array which can store marks for 5 courses for up to 50 students The program should first obtain student names and their corresponding marks for a requested number of students from the user. Please note that the program should reject any number of students that...
Multidimensional Arrays Design a C program which uses two two-dimensional arrays as follows: - an array...
Multidimensional Arrays Design a C program which uses two two-dimensional arrays as follows: - an array which can store up to 50 student names where a name is up to 25 characters long - an array which can store marks for 5 courses for up to 50 students The program should first obtain student names and their corresponding marks for a requested number of students from the user. Please note that the program should reject any number of students that...
Multidimensional Arrays Design a C program which uses two two-dimensional arrays as follows: - an array...
Multidimensional Arrays Design a C program which uses two two-dimensional arrays as follows: - an array which can store up to 50 student names where a name is up to 25 characters long - an array which can store marks for 5 courses for up to 50 students The program should first obtain student names and their corresponding marks for a requested number of students from the user. Please note that the program should reject any number of students that...
[C++ Coding question] write a program which inputs data to a two-dimensional array: - Input number...
[C++ Coding question] write a program which inputs data to a two-dimensional array: - Input number of rows r aand number of columns c - Create a two-dimensional array of integers int numbers[r][c] -input data for each element of numbers Your program must compute and display the largest number is each row and column of the number array
Write a program that copies the even number of bits from a into the corresponding bits...
Write a program that copies the even number of bits from a into the corresponding bits in b ,only use bit-manipulation instructions, no loop int main () { uint_32 a = 0 xaabbccdd ; uint_32 b = 0 x11223344 ; // Replace bits 0 ,2 ,4 ,... of b with bits 0 ,2 ,4 ,... from a . uint_32 result = ...; // Print out the result as a hexadecimal number }
Write a program that contains the following Write a function copies with two int parameters, named...
Write a program that contains the following Write a function copies with two int parameters, named n and x. It should dynamically allocate a new array of size n.  The function should then copy the value in x to every position in the array. The function should return a pointer to the new array. In the main function, call the copies function from part 1. with size 5 and value -1.  Output the resulting array to the screen, and deallocate the array....
This is for c++ Write a program that works with two arrays of the same size...
This is for c++ Write a program that works with two arrays of the same size that are related to each other in some way (or parallel arrays). Your two arrays must be of different data types. For example, one array can hold values that are used in a formula that produces the contents of the second array. Some examples might be:  from a previous program, populations and the associated flowrates for those populations (an int array of populations...
Write a program in java which has two arrays of size 4 and 5; merge them...
Write a program in java which has two arrays of size 4 and 5; merge them and sort.
Write a program that concatenates the characters in a two-dimensional into a set of Strings in...
Write a program that concatenates the characters in a two-dimensional into a set of Strings in a one-dimensional array as described below. main #Request and Read in the number of rows of a two dimensional array. #Create the reference to the two-dimensional array. For each row #Request and Reads in a line of text #Based on the length of the line create a row with the correct number of columns (look #back to lesson 3) #Place each character for the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT