Question: Predict the output of the given code. package com.infy.demo; record Policy ( int policyNumber, String policyName, long duration, double interestRate ) { } public class
Predict the output of the given code.
package com.infy.demo;
record Policyint policyNumber, String policyName, long duration, double interestRate
public class DemoClass
public static void mainString args
Policy policy new Policy "DummyPolicy", f;
Policy policy new Policy "DummyPolicy", ;
System.out.printlnpolicyequalspolicypolicy policy
policyhashCode policyhashCode;
false true false
false false false
true false true
true false false
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
