/** * Author: Josiah Yoder et al. * User: yoder * Class: SE1011-011 * Date: 10/21/13 1:18 AM * Lesson: Week 7, Day 1 */ public class Example011_9_2 { public static void main(String[] ignored) { // Primitive array approach double[] pointsNorth; pointsNorth = new double[4]; double[] pointsEast = new double[4]; // New improved object approach Point011_9_2[] points = new Point011_9_2[4]; Point011_9_2[] points2 = new Point011_9_2[4]; // Competition scores // 50-hotdogs // high score for the year double[] winnersTimeMinutes = new double[5]; winnersTimeMinutes[0] = 3.5; winnersTimeMinutes[1] = 2.5; winnersTimeMinutes[2] = 2.6; winnersTimeMinutes[3] = 1.8; winnersTimeMinutes[4] = 3.4; if(points.equals(points2)) { System.out.println("They are both equal!"); } int length = points.length; // attribute, not method System.out.println("The points object: "+points.toString()); System.out.println("The points object: "+points); // Same thing // Method overloading // two methods with the same name in the same class //Complex011_9_2 c1 = new Complex011_9_2(5,5,5);// bad } }