Now i am trying to put the coordinates of Y into an array but it is not working can any one correct this for me i do not want to create classes for this program
import javax.swing.JOptionPane;
/**
*
* @author irvan
*/
public class Main {
// private static Object Cord_y;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
double Codr_x[];
double Codr_y[];
Codr_y = new double[2];
Codr_x = new double [2];
int z =1;
for (int i = 0; i < Cord_y.length(); i++) {
String in = JOptionPane.showInputDialog("Enter the coordinates for Y"+z);
Cord_y =Double.parseDouble(in);
++z;


Sign In
Create Account


Back to top









