This is what I'm supposed to do:
A Java program using single dimensional array. Have a list of 10 numbers and fetch a value based on the index.
The second part is not very clear, so I ended up with my code saying:
class SingleDimensionalArray
{
public static void main(String args[])
{
int a[]=new a[10];
a[]={1,2,3,4,5,6,7,8,9,10};
}
}
What's wrong with my code?And/or what did I leave out?