Deena Lee wrote:
Here is the code I tried:
Raymond Tong wrote:
Deena Lee wrote:
Here is the code I tried:
If your index is 4, what would you get in this method ?
By the way, your indentation seems have mix up of spaces and tabs which you should avoid.
Deena Lee wrote:
Sorry, but I don't understand your comment about index 4. I only have 3 dogs. The print statements, I have to use, to get their names are ...
System.out.println(dog.getFido(1))
System.out.println(dog.getFido(2))
System.out.println(dog.getFido(3))
Raymond Tong wrote:
Deena Lee wrote:
Sorry, but I don't understand your comment about index 4. I only have 3 dogs. The print statements, I have to use, to get their names are ...
System.out.println(dog.getFido(1))
System.out.println(dog.getFido(2))
System.out.println(dog.getFido(3))
What I am saying is, if you do
What do you expect? Or this statement would not happen anyway ?
Deena Lee wrote:
[public int getFido(int index)
{
if (fido == 1)
return oneFido;
else if (fido == 2)
return twoFido;
else
return thirdFido;
}]
Are you a blonde? Don't worry: everybody does that sort of thing. And not only when they are beginners. And welcome to the RanchDeena Lee wrote:Ahhhh .... DUH! ... what a . . .
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |