Exit 1Z0-830 Java SE 21 Developer Professional
Question 5 of 5
0% complete
Q5 Multiple choice

Given:

java

record WithInstanceField(String foo, int bar) {

double fuz;

}

record WithStaticField(String foo, int bar) {

static double wiz;

}

record ExtendingClass(String foo) extends Exception {}

record ImplementingInterface(String foo) implements Cloneable {}

Which records compile? (Select 2)

Select all that apply.

  • A

    ExtendingClass

  • B

    WithInstanceField

  • C

    ImplementingInterface

  • D

    WithStaticField