need those questions to be done as soon as possible


1.       Write Java statements that compares Objects, O1 and O2, using the getClass() method.


2.       What does the instanceof operator do?

3.       What are the different ways in which you can check the class of an Object?

are not answered


4.       Create a class to represent a Rectangle. Your class should contain instance variables for length and width, as well as member method to calculate the area and perimeter.


5.       Create a test driver to test the functionality of your Rectangle class created in the previous question

    • 6 years ago
    • 5