Jesper de Jong wrote:The actual output is "Hello World!" with a newline character appended to it; you expect that it is "Hello World!" without a newline character appended.
Either try this in line 24:
Or, in line 9, use print() instead of println(). Note that println() prints the text you specify plus a newline.
Jesper de Jong wrote:
Are you using JUnit? Normally you would not have a main() method in your JUnit test. You'd just write a test method with a @Test annotation above it, and then use JUnit from Eclipse to run the test (Run -> Run As... -> JUnit Test).
So, instead of a main() method in class HelloWorldTest, you'd have something like this: