Correct method call
<p>This is the code that we have been provided with. I've been revising for an exam:</p>

<pre><code>public class Car
{
public int numberOfSeats;
private String model;
private int engineCode;
public Car(String model)
{
model = model;
}
public int getSeats()
{
return numberOfSeats;
}
private String getModel()
{
return model;
}
public void setEngineCode(int code)
{
int n = code * 2;
if(code &gt;= 100) {
engineCode = n;
}
else {
engineCode = code;
}
}
}
</code></pre>

<p>The question is regarding a method call. I believe that it is (b) but am not sure why. Any explanation would be brilliant.</p>

<p>Which of the following is a correct call of the getSeats method. (Assume <code>car</code> holds a
<code>Car</code> object.)</p>

<p>(a) <code>String s = car.getSeats();</code><br>
(b) <code>int n = car.getSeats();</code><br>
(c) <code>car getSeats();</code>  </p>
