If we are working on Eclipse, then we are formatting code with CTRL + SHIFT + F we get the code is not nape because the line is going down by limit line width.
To fix this:
In preferences Java -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the option for line width (Maximum line width:). you will need to make your own profile.