Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Checking my logic on this to see if nailed down the == and equals() concept Book emp1 = new Employee(Alex Shaw, 1001); Book emp2 =

Checking my logic on this to see if nailed down the == and equals() concept

Book emp1 = new Employee(Alex Shaw, 1001);

Book emp2 = new Employee(Juliet Green, 1001);

Book emp3 = new Employee(Alex Shaw, 1001);

Book emp4 = new Employee(Alex Shaw, 1002);

Book emp5 = null;

  1. True or false: emp1 == emp3 False
  2. True or false: emp1.equals(emp3) True
  3. True or false: emp1.equals(emp2) False
  4. True or false: emp1.equals(Alex Shaw) True
  5. True or false: emp1.equals(emp4) False
  6. True or false: emp1.equals(emp5) False
  7. True or false: emp1.equals(emp1) True

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions