Question: In java please. // Given the following class declaration, write a default constructor that initializes both private variables to 1. Do not add or change
In java please. // Given the following class declaration, write a default constructor that initializes both private variables to 1. Do not add or change any other code. class Rectangle { private int height; private int width; public int area() { return this.height * this.width; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
