Question: // 1.) Define two double instance variables named // first and second // // 2.) Define a constructor which takes two doubles, // and sets

// 1.) Define two double instance variables named // first and second // // 2.) Define a constructor which takes two doubles, // and sets the instance variables to the values // of those two doubles. Instance variable // first needs to be set to the first constructor // parameter, and instance variable second needs to // be set to the second constructor parameter. // // 3.) Define an instance (not static!) method named // printMe which takes no arguments and doesn't // return anything. This should print out // the values of the instance variables, with // the Strings "First: " and "Second: " preceding // them. For example, if the instance variables // held the values 2.3 and 3.4, this should print out: // // First: 2.3 // Second: 3.4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!