Write in Short Notes:-
1.What is an array?
2.Syntax of array?
3.Example of array?
4.What is a scanner Class Uses in Java?
Answers
1.In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements, each identified by at least one array index or key. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula.
2.Array declaration syntax is very simple. The syntax is the same as for a normal variable declaration except the variable name should be followed by subscripts to specify the size of each dimension of the array.
3.For example, they can picture students in a marching band arranged in equal rows or chairs set up in rows in an auditorium. ... An arrangement of objects, pictures, or numbers in columns and rows is called an array. Arrays are useful representations of multiplication concepts.
4.The Scanner class is used to get user input, and it is found in the java. util package.