How to declare array in Java?

 
 

Share on Google+Share on Google+

Java Coder
How to declare array in Java?
1 Answer(s)      8 months ago
Posted in : Java Beginners
Ads

Hi,

How to declare array in Java?

Thanks

Ads
View Answers

April 16, 2017 at 7:52 PM


Hi,

Following is a code of declaration of String array:

String[] javaTechnologies = new String[]{"Java", "JSP", "Servlet", "JPA"};

Example of declarating integer array:

int[] nums = new String[]{1,2, 5, 7};

Check more example at Java Array declaration.

Thanks


Ads









Ads

 
Advertisement null

Ads