Complete the method declaration so it returns an integer.
public ___ size() {
return 3;
}Answer & explanation
Answer: int
The declared return type must match the returned value; `3` is an `int`.
Practice declarations with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
public ___ size() {
return 3;
}Answer: int
The declared return type must match the returned value; `3` is an `int`.