Which is true?

Given:
13. class Stone {
14. String color = “white”;
15. }
16.
17. public class ManyStones {
18. Stone[] stones = {new Stone(), new Stone(), new Stone()};
19. }
Which is true?

Given:
13. class Stone {
14. String color = “white”;
15. }
16.
17. public class ManyStones {
18. Stone[] stones = {new Stone(), new Stone(), new Stone()};
19. }
Which is true?

A.
Compilation fails.

B.
The class ManyStones has a color attribute.

C.
The class Stone has a relationship to a ManyStones object.

D.
The class ManyStones CANNOT have access to multiple class Stone objects.

E.
The class ManyStones has a relationship to three Stone objects.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Opeth

Opeth

E is the correct