I am trying to copy the elements of an array input by the user starting at position 2 into another array called value and using that input starting a position 2 to create a graph.
public static void main(String[] args) { for (int i = 0; i < args.length; i++){ //Grabs the first 2 elements of the users input int width = Integer.parseInt(args[0]); int height = Integer.parseInt(args[1]); //Controls the Height and Width of the frame JFrame frame = new JFrame(); frame.setSize(height, width); double[] value = new double[6]; String[] languages = new String[6]; //Controls the value[0] = 50; languages[0] = "Visual Basic"; value[1] = 2.5; languages[1] = "PHP"; value[2] = 3; languages[2] = "C++"; value[3] = 4; languages[3] = "C"; value[4] = 5; languages[4] = "Java"; value[5] = 6; languages[5] = "Java"; frame.getContentPane().add(new SimpleBarChart(value, languages, "ProjectOne")); WindowListener winListener = new WindowAdapter() { public void windowClosing(WindowEvent event) { System.exit(0); } }; frame.addWindowListener(winListener); frame.setVisible(true); } } }