
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is an array and what is it used for?
An array is a data container which holds a fixed length of elements of homogeneous data type. It is used to store the elements of the same datatype.
Example
public class ArrayExample { public static void main(String args[]){ int myArray[] = {44, 69, 89, 635}; for (int i = 0; i<myArray.length; i++){ System.out.println(myArray[i]); } } }
Output
44 69 89 635
- Related Questions & Answers
- What is an array and how is it used for?
- What is Vernier Calipers and How it is used for Measurement?
- What is Screw Gauge and how it is used for measurement?
- What is CSS and why it is used?
- What is HTML5 IndexedDB and why it is used?
- What is a Selector and how it is used in CSS?
- What is Vestigial side band modulation? Why is it used?
- What is an Account Number and how is it useful?
- What is Jailbreaking and is it Safe?
- What is MySQL TRUNCATE command used for?
- What is MySQL DROP command used for?
- What is MySQL DELETE command used for?
- What is Yellow Jaundice? What is the best treatment for it?
- What is Methanol and why is it considered an alternative cooking fuel?
- What is Get-Content in PowerShell used for?
Advertisements