Can't print a void return value. Either return a string, or do all the printing in bark().
Personally, having a method that prints " says Ruff!", and depending on the calling method to put something in front of it that makes sense, is the start of a bad API. Options would include just returning "ruff" and doing the additional work in the calling method, or doing the name + barking sound in the bark() method, but there are other options as well.
Arun C. Giridharan
Ranch Hand
Joined: Jul 11, 2010
Posts: 96
posted
0
Thank you .... i forgot about return type (String)
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.