Answered step by step
Verified Expert Solution
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;
- True or false: emp1 == emp3 False
- True or false: emp1.equals(emp3) True
- True or false: emp1.equals(emp2) False
- True or false: emp1.equals(Alex Shaw) True
- True or false: emp1.equals(emp4) False
- True or false: emp1.equals(emp5) False
- True or false: emp1.equals(emp1) True
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started