Question: 1.Develop a class named FlightTester that has one main method. Declare four variables flight1 , flight2 , flight3 , and flight4 of type Flight ,

1.Develop a class named FlightTester that has one main method.

Declare four variables flight1, flight2, flight3, and flight4 of type Flight, i.e., they can hold references to Flight objects.

Create four Flight objects as per the above examples and assign the references to flight1, flight2, flight3, and flight4, respectively.

Check if flight3 and flight4 are the same using the equals method and print either the message that says "Same flight" or "Not same flight"

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!