Question 72 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 72 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given:

public class Product {

int id;

String name;
public Product (int id, string name) {

this.id

id;

this.name = name;

)

And given the code fragment

Product
Product
Product
boolean
boolean

earns

System.out. print (ans1 +

pl = new Product (101, "Pen")

p2 = new Product (101, "Pen")

p3 = pl

ansl = pl == p2;

ans2 = pl.name.equals (p2.name) ;

+ ans2);

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.