P2Cart Logo
Write a program in Java to find the sum of all even numbers and product of all odd numbers of the elements of the D.D.A.

This Java program calculates the sum of all even numbers and the product of all odd numbers in a double-dimensional array using nested loops. Meta tags are included for SEO purposes.

Read more
A double-dimensional array is defined as:
int m[ ][ ] = {{12, 10, 12, 23}, {17, 12, 14, 15}, {41, 33, 40, 51}};
Write a program in Java to find the sum of all even numbers and the product of all odd numbers of the elements of the D.D.A.
Read Answer
Write a program in Java to store 20 numbers in S.D.A and display only those numbers which are prime.

This Java program stores 20 numbers in an array, checks for prime numbers using a helper method, and displays only the prime numbers. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store 20 numbers in S.D.A and display only those numbers that are prime.
Read Answer
Store 20 numbers (including even and odd numbers) in S.D.A and display the sum of all even numbers and all odd numbers separately stored in the cell.

This Java program stores 20 numbers in an array, calculates the sum of all even and odd numbers separately, and displays the results. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store 20 numbers (including even and odd numbers) in S.D.A and display the sum of all even numbers and all odd numbers separately stored in the cell.

Read Answer
Store runs scored by 11 Indian Cricket Players of an innings along with their names. Now display the name of the cricketer who has made the highest score in that innings along with runs.

This Java program stores the names and runs scored by 11 Indian cricket players in arrays, identifies the highest scorer, and displays their name and score. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store runs scored by 11 Indian Cricket Players in an innings along with their names. Now display the name of the cricketer who has made the highest score in that innings along with runs.

Read Answer
Store 20 temperatures F in S.D.A and display all the temperatures after converting them into C. [Hint: C/5 = F-32/9]

This Java program stores 20 temperatures in Fahrenheit, converts them to Celsius using the formula � = 5 9 × ( � − 32 ) C=95​×(F−32), and displays both values in a formatted table. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store 20 temperatures F in S.D.A and display all the temperatures after converting them into C.
[Hint: C/5 = F-32/9]

Read Answer
Store 20 numbers in S.D.A and display all those numbers which are consecutive. e.g.: 78 & 79 are consecutive numbers and so on …….

This Java program stores 20 numbers in a single-dimensional array, identifies consecutive numbers, and displays them. If no consecutive numbers are found, it shows an appropriate message. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store 20 numbers in S.D.A and display all those numbers which are consecutive. e.g.: 78 & 79 are consecutive numbers and so on …….

Read Answer
Write a program in Java to store all the names and the total marks in two different S.D.A and display all the names of the students according to the rank obtained in the final examination, keeping the first rank at the top and so on.

This Java program stores the names and marks of 40 students, sorts the marks in descending order, and displays the names along with their corresponding ranks. Meta tags are included for SEO purposes.

Read more

A teacher wants to keep the names and their total marks obtained in the final examination of her class having 40 students. Write a program in Java to store all the names and the total marks in two different S.D.A and display all the names of the students according to the rank obtained in the final examination, keeping the first rank at the top and so on.

Read Answer
Store 20 different names and telephone numbers of your friends in two different S.D.A. Now arrange all the names in alphabetical order and display all the names along with their respective telephone numbers.

This Java program stores 20 names and their corresponding telephone numbers in two arrays, sorts the names alphabetically, and displays the sorted names along with their respective phone numbers. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store 20 different names and telephone numbers of your friends in two different S.D.A. Now arrange all the names in alphabetical order and display all the names along with their respective telephone numbers.
Read Answer
Store 20 different names in S.D.A. Now enter a name and search whether the name is present or not using Linear search technique.

This Java program stores 20 different names in an array and searches for a name entered by the user using the linear search technique. It displays whether the search was successful or unsuccessful. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store 20 different names in S.D.A. Now enter a name and search whether the name is present or not using Linear search technique. If the name is present then display the message “Search successful” otherwise display “Search unsuccessful”. 
Read Answer
Store 10 different country names and their capitals in two different S.D.A. Display the names along with their capitals in the given format.

This Java program stores 10 country names and their capitals in two different single-dimensional arrays and displays them in a formatted table. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store 10 different country names and their capitals in two different S.D.A. Display the names along with their capitals in the given format.

Country Name
x x x x x
x x x x x
Capital
x x x
x x x
Read Answer
Find the greatest number of the given Single Dimensional Array. int m[ ] = {63, 38, 14, 50, 92, 25};

This Java program finds the greatest number in a given single-dimensional array. It compares each element to find the largest value. Meta tags are included for SEO purposes.

Read more
Write a program in Java to find the greatest number of the given Single Dimensional Array.
int m[ ] = {63, 38, 14, 50, 92, 25};

Read Answer
Store the given numbers of the Single Dimensional Array into another S.D.A in reverse order of the location. int m[ ] = {54, 11, 23, 56, 76, 80};

This Java program stores the elements of a single-dimensional array in another array in reverse order. It iterates over the original array and assigns values to the new array in reverse. Meta tags are included for SEO purposes.

Read more
Write a program in Java to store the given numbers of the Single Dimensional Array into another S.D.A in reverse order of the location.
int m[ ] = {54, 11, 23, 56, 76, 80};
Read Answer
Find the sum and average of the numbers of the given Single Dimensional Array. int m[ ] = {23, 31, 44, 56, 72, 55};

This Java program calculates the sum and average of numbers in a given single-dimensional array. It iterates over the array to sum the elements and computes the average. Meta tags are included for SEO purposes.

Read more
Write a program in Java to find the sum and average of the numbers of the given Single Dimensional Array.
int m[ ] = {23, 31, 44, 56, 72, 55};

Read Answer
Create a Square Matrix of 3*3 and store numbers in it. The programmer wants to check whether the Matrix is Symmetric or not.

This Java program determines whether a 3x3 square matrix is symmetric. A matrix is symmetric if the element at (i, j) equals the element at (j, i) for all i and j. It includes user input, matrix display, and symmetry validation. Meta tags are included for SEO purposes.

Read more
Write a program in Java to create a Square Matrix of 3*3 and store numbers in it. The programmer wants to check whether the Matrix is Symmetric or not. A square Matrix is Said to be Symmetric, if the element of the ith row jth column is equal to the element of jth row and ith column. e.g.: A Symmetric Matrix:
1     2     3
2     4     5
3     5     6

Read Answer
A Metropolitan Hotel has 10 floors numbered from 0 to 9, each floor having 50 rooms. Using a single subscripted variable for the name of the customers and a double subscripted variable R(F, I) where F and I represent floor and room numbers respectively

This Java program simulates a room allocation system for a hotel with 10 floors and 50 rooms per floor. It uses a 2D array to manage room bookings and customer names. Meta tags are included for SEO purposes.

Read more

A Metropolitan Hotel has 10 floors numbered from 0 to 9, each floor having 50 rooms. Using a single subscripted variable for the name of the customers and a double subscripted variable R(F, I) where F and I represent floor and room numbers respectively, write a program in Java for the room allocation work. The program should automatically record the name of the customer and the room number. 

Read Answer
Write a program in Java to store day, maximum temperature, minimum temperature of the week in a Double Dimensional Array of 7*3.

This Java program stores the day, maximum temperature, and minimum temperature for a week in a 7x3 matrix. It allows the user to input a specific day to display its temperatures. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store day, maximum temperature, minimum temperature of the week in a Double Dimensional Array of 7*3. The program accepts a particular day of the week and displays maximum and minimum temperature of that very day. Use Input Stream statement for the same.

Read Answer
Find the sum of the numbers of corresponding elements of the two Matrices and store it in another Matrix of 4 by 4 by using Input Stream statement.

This Java program calculates the sum of corresponding elements from two 4x4 matrices using input from the user. The result is stored in another matrix and displayed. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store the numbers in two different matrices of 4 by 4 in Double Dimensional Array. Find the sum of the numbers of corresponding elements of the two Matrices and store it in another Matrix of 4 by 4 by using the Input Stream statement. 

Read Answer
Find the sum of the numbers of left diagonal and the sum of the numbers of right diagonal of the Matrix by using assignment statement.

This Java program computes the sum of the left diagonal and the right diagonal of a 4x4 matrix using a two-dimensional array. Results are displayed, and meta tags are included for SEO purposes.

Read more

Write a program in Java to store the numbers in a 4 by 4 Matrix in Double Dimensional Array. Find the sum of the numbers of the left diagonal and the sum of the numbers of the right diagonal of the Matrix by using the assignment statement. 

Read Answer
Find the sum of the numbers of each row and the sum of the numbers of each column of the Matrix by using assignment statement.

This Java program calculates the sum of each row and column in a 4x4 matrix using a two-dimensional array and displays the results. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store the numbers in a 4 by 4 Matrix in Double Dimensional Array. Find the sum of each row's numbers and the sum of each column of the Matrix by using the assignment statement.

Read Answer
Find the transposition of the Matrix by using the assignment statement. Transposing of a Matrix means changing the row elements into columns and column elements into rows.

This Java program demonstrates how to compute the transpose of a 4x4 matrix using a two-dimensional array. It swaps rows and columns and displays both the original and transposed matrices. Meta tags are included for SEO purposes.

Read more

Write a program in Java to store the numbers in a 4 by 4 Matrix in Double Dimensional Array. Find the transposition of the Matrix by using the assignment statement. Transposing of a Matrix means changing the row elements into columns and column elements into rows.

Read Answer