Which of the following are valid record declarations? (Choose exactly two correct options)

I. public record Child(int age) {
private static final int age = 10; }

II. public final record Child1() {}

III. public abstract record Child2() {
private static String name; }

IV. public record Child3(boolean fun) {

@Override public boolean fun() { return false; } }


V. public record Child4(long size) {
@Override public boolean equals(Object obj) { return false; }
public void setSize(long size) {
this.size = size;
} }

Child

Child1

Child2

Child3

Verified Answer
Correct Option - bd

To get all Infosys Certified Java SE 17 Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in