Change basic sum scala example to match java one more closely