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);

}

}

>

[1796 byte] By [Alexmina] at [2007-11-27 1:57:14]
# 1
System.out.println("x is " + x + " x*x is " + Data[x]);
kajbja at 2007-7-12 1:32:36 > top of Java-index,Java Essentials,New To Java...
# 2
So for a given x, you have stored x*x value in Data[x].What about printing both x and Data[x] then?
TimTheEnchantora at 2007-7-12 1:32:36 > top of Java-index,Java Essentials,New To Java...
# 3
(And what errors did you get when you tried to use Math.pow?)
kajbja at 2007-7-12 1:32:36 > top of Java-index,Java Essentials,New To Java...