What is an element and regular variable? in arrays in java

I would imagine that a "regular variable" is probably just a single variable that doesn't hold an object or array -- it just holds a primitive. But I'm not sure about that.

An element is the item that is contained at a certain index in an array. For instance, let's say I used a String array as a shopping list:

0) "Milk"
1) "Orange Juice"
2) "Bread"
3) "Eggs"
4) "Squash"
5) "Cereal"

At index 3, the element is the String "Eggs". Comprende?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.