Welcome to JavaRanch!
I see two issues that are preventing this from compiling. The first is...
array calc = new array();
In
Java, the syntax for creating arrays is a little different than for most other objects: You don't call a constructor called "Array." Instead, arrays are created as you already did 4 lines above this...
int[] array = new int[20];
So you've already got your array created, and you can remove the "new array()" line.
The next issue is when you try to call...
calc.display(array);
The method "display" is an
instance method in a separate class called Two. So to use this method, you need to create an
instance of Two and use that to call the method. For example...
Two myTwo = new Two();
myTwo.display(array);
These things will allow the code to compile. After that, see what the output tells you when you run.
PS: Note that I added
Code Tags to your original post. This keeps your code formatting intact so it's easier for others to read. Please use these in future posts.
[ March 26, 2006: Message edited by: marc weber ]