0% found this document useful (0 votes)
3 views

Array in Java Questions

The document explains the concept of arrays in programming, highlighting that they store multiple values of the same data type and start indexing from 0. It provides an example of array declaration in Java and poses several programming questions related to array operations, such as accepting user input, calculating sums, finding maximum values, and sorting. The questions aim to enhance understanding of array manipulation and operations.

Uploaded by

nilimapawase14
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Array in Java Questions

The document explains the concept of arrays in programming, highlighting that they store multiple values of the same data type and start indexing from 0. It provides an example of array declaration in Java and poses several programming questions related to array operations, such as accepting user input, calculating sums, finding maximum values, and sorting. The questions aim to enhance understanding of array manipulation and operations.

Uploaded by

nilimapawase14
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

•Array is a container which store multiple values on same data type.

•array is always starts from 0

•Declaration of array:
int []a=new int[5];

•we declare "a" variable as an array which will hold 5 values.

•int []a;
•a=new int [5];

Question:
1)WAP to accept the size of array from user and then accept that many values in the
array display those values
2)WAP to accept to random 7 values from user in the array and
1)print addition of all the elements of that array?
2)print the greatest value from that an array?
3)print the second highest value from an array without changing its original
position?
4)print only prime numbers from an array?
5)print array in ascending order?
6)print reverse order array?

You might also like