PROGRAM AREA
Statistics
The Highest Post
Statistics
Count
94
Avg
21.00
Min
21
Max
21
Angualr Top questions
Details
Peter Agyekum
How does an Array instantiated?
You can instantiate an array in one of two ways: you can use the new keyword to create an empty array of a certain size. That syntax looks like this if you wanted to create an array of 10 ints. You could also initialize an array with its values directly, using curly braces as shown. This will create an int array of size 3, which comes preloaded with the values 2, 4, and 6 Accessing a value in an array is as simple as using the variable name, followed by the desired index between brackets. You can also use this syntax to store a value directly to an index in an array. All arrays have a built-in length property, which stores the number of indices the array possesses
Post Reply
Back to HomePage
Related Topics
What is Java Virtual machine?
What does it mean, when code is written in discrete units of related code?
What is the first line in a class?
What is the the second line of a class ?
What is access modifiers in Java?
How do you name your class?
What is a method
What is examples of method's Access Modifier?
What is static in Java?
Give some characteristics of Java?
Explain more on discrete units of related code?
what steps need to follow to write your java program?
Describe the variables in Java?
How may primitive data types in Java?
What does assignment operator do?
What is An array?
How does an Array instantiated?
What is JavaScript prototype?
What is Functional Interface in Java?
lambda expression in java 8?
What are the four Garbage memory collectors in Java?