Diffrence between array and enum?

Status
Not open for further replies.

prem4u

Old is Gold
Joined
Sep 20, 2006
Messages
83
what is Difference between array and enum ?

practically i know it..but how to explain the difference theoretically.??
 

ayush_chh

Ambassador of Buzz
Joined
Nov 25, 2005
Messages
528
about C probably....... do we have enum any where else with diff meaning..

array stores the actual data that is provided by user. but enum stores the index whatever may be the data starting from 0....

if you want perfect definition then pls refer book.....:)
 

chandru.in

In the zone
Joined
Mar 23, 2008
Messages
472
Java does support enums. Java's enums are very very different from C's, so wanted to comfirm.
 

Pragadheesh

In the zone
Joined
Jul 10, 2006
Messages
401
Array:
-Array is a collection of data items of same data type.
-Array shares a same name with different index number, which starts from zero.

Enums:
-Enums are collection of named constants.
-Enum variables if not initialized then the variables will be initialized automatically from 0 onwards.

but why do u compare enum and array?
 
Status
Not open for further replies.
Top