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
To get all Infosys Certified Java SE 17 Developer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee