AddThis Social Bookmark Button

Java 10 years back is not the same java any more, processing power crammed in with multiple cores , screen got wider and we are still stuck at 80 wide characters ? From Java

convention 80 char wide should have been deprecated since more than 99% screen resolution has gone above

HD , read here, Oracle please update the code formatting rules.

 

whether you use eclipse formatter or Java formatter in Eclipse ,you should be able to change it with as easy with the following instruction.

  1. From your eclipse menu Window->preferences
  2. Choose Java->code style->"Formatter"
  3. in the active profile you should find either "Eclipse" or "Java conventions"
  4. Click on the "New" (since you can not edit existing formatter)
  5. Give your profile a name and choose the existing profile you use in your set up from which you will modify the line wrapping.Make sure you chose the "Open the edit dialog now", finally click "ok"
  6. Now when the new profile dialog opens , traverse to the line wrapping and change the maximum line width to the desired number, 120 would be a good idea.
  7. Click Ok and you are done, your profile is now applied to be the current active profile.  

Now go to your favorite java code and then press ctrl+shift+F to see the effect.