What is array in java with example?

 
 

Share on Google+Share on Google+

Java Coder
What is array in java with example?
1 Answer(s)      7 months ago
Posted in : Java Beginners

Hi,

I am beginner in Java and want to learn Java Array concepts. Which is the best tutorials for learn Java Array with example codes?

What is array in java with example?

Thanks

Ads
View Answers

April 17, 2017 at 5:34 PM


Hi,

Arrays in Java is a container of fixed size for holding similar data types.

Arrays of integer can only handle integer values. String array can only handle data in String format and so on.

You can declare an int array with help of following code:

int[] a = new int[5];

You can assign data with following code:

a[0]=10;

Check 100s of Array tutorial for learning Array in Java.

Thanks


Ads









Ads

 
Advertisement null

Ads