Return to site
JAVA CERTIFICATION QUESTION: Nested types and Java records
JAVA CERTIFICATION QUESTION: Nested types and Java records
=>Records can be a top-level construct or enclosed inside a class. Does it matter?
·
Given the following class Item
Which of the following are correct? Choose two.
A. Item.Price p = new Item().new Price(0, 100);
B. Item.Price p = new Item().Price(0, 100);
C. Item.Price p = new Item.Price(0, 100);
D. Item.Description d = new Item().new Description("ABC");
E. Item.Description d = new Item().Description("ABC");
F. Item.Description d = new Item.Description("ABC");
·ꓷ puɐ ꓛ suoᴉʇdo ǝɹɐ sɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ