/*
* @(#)Testarray.java 1.0 02/03/08
*
* You can modify the template of this file in the
* directory ..\JCreator\Templates\Template_1\Project_Name.java
*
* You can also create your own project template by making a new
* folder in the directory ..\JCreator\Template\. Use the other
* templates as examples.
*
*/
package myprojects.testarray;
import java.awt.*;
import java.awt.event.*;
class Testarray extends Frame {
private double diver[][][] = new double[40][20][3];
public Testarray() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
for(int iframe=0; iframe < 40; iframe++) {
for(int irow=0; irow < 20; irow++) {
for(int icol = 0; icol<3; icol++) {
diver[iframe][irow][icol]=(double)iframe*irow*icol;
}
}
}
double r = diver[1][1][2] * diver[2][2][1];
System.out.println(r);
}
public static void main(String args[]) {
System.out.println("Starting Testarray...");
Testarray mainFrame = new Testarray();
mainFrame.setSize(400, 400);
mainFrame.setTitle("Testarray");
mainFrame.setVisible(true);
}
}
|