WeiJie Lim wrote:Still don't get it,sorry. The previous line is "System.out.print(“last dog’s name is “);" am I right ? It prints "last dog’s name is" normally, as for "Bart" it should jump to a new line ?
You're using print() not println(), that's why it is printed in the same line.
WeiJie Lim wrote:thinking about this got me confused about something else - why is "null says Ruff!" printed at the start.. as the command for it is below the command for "last dog's name" .
You are invoking bark() method at line 6 of your code, that's why you get "null says Ruff" at the output. Printing "last dog's name..." is done at line 19-20.
The quieter you are, the more you are able to hear.
We find this kind of rampant individuality very disturbing. But not this tiny ad: