Download to read offline



![Array declaration: • In java we can declare array in two ways type arrayname[ ]; type[ ] arrayname; • In java we will not give the array size at declaration. • The type will determine what type of data the array will hold.](https://image.slidesharecdn.com/arraysinjavasignledimensionalarray-180331064554/75/Arrays-in-java-signle-dimensional-array-4-2048.jpg)
![Creation of array: arrayname = new type[size]; Here we will give the array size.](https://image.slidesharecdn.com/arraysinjavasignledimensionalarray-180331064554/75/Arrays-in-java-signle-dimensional-array-5-2048.jpg)
![Initialization of array: • after array creation we can initialize the array like this: arrayname[index]=value;](https://image.slidesharecdn.com/arraysinjavasignledimensionalarray-180331064554/75/Arrays-in-java-signle-dimensional-array-6-2048.jpg)

![Declaration , creation and Initialization of Java Array: • In java we can declare , create and initialize the array together like this: type[] arrayname = {value1,value2,value3};](https://image.slidesharecdn.com/arraysinjavasignledimensionalarray-180331064554/75/Arrays-in-java-signle-dimensional-array-8-2048.jpg)

This document discusses one-dimensional arrays in Java, including how to declare, create, and initialize arrays. It notes that arrays can hold a fixed number of values of a single type, and that arrays in Java are indexed starting from 0. The document provides examples of declaring an array without specifying a size, creating an array by specifying the type and size, and initializing array elements by assigning values to indexes. It concludes by stating the assignment is to find the minimum and maximum number from an array by having the user enter the array size and values.