Output problem in array, code included.
Been hacking away at a starting java class for a few months now, and never had to resort to asking you guys for help.
However, i missed class all week due to work conflicts, so i couldn't question my professor on this problem. Oddly, the actual array bits i'm fine with, but the output has me stalled.
The program is ment to square the numbers 1-10, and then it wants me to output the square and the original number on the same line (It also wanted me to use Math.pow to get the squares, but that gave me a whole slew of syntax errors i couldn't figure out, so i did it the easy way).
I'm not sure how to do this, have tried quite a few things, but i'm fairly certain i'm just missing something obvious, any tips would be helpful.
import javax.swing.*;
publicclass J6E1{
publicstaticvoid main( String args[] )
{
int [] Data =newint [11];
for (int x=1; x<Data.length; x++)
{
Data[x] = (x*x);
}
for (int x=1; x><Data.length;x++)
{
System.out.println(Data[x] );
}
System.exit(0);
}
}
>

