Card 37 / 76: Which declaration is a valid constructor for the class CreateMiracle?
A)
public void createMiracle(){}
B)
public String createMiracle(String wish, String prayer) {}
C)
private String createMiracle(String wish) {}
D)
public CreateMiracle(String wish, String prayer){}
Answer:
D) public CreateMiracle(String wish, String prayer){}
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
A, B, and C are incorrect because they are all method declarations.
|