by, 05-21-2011 at 10:50 PM (4089 Views)
Its always useful to wrap strings if they are too long. This provides better readability. Eclipse has support for this.
String literals can wrapped when you edit them. Place your cursor at the point of literal where you want to wrap and press Enter. For example:
I kept the cursor at ‘sure’ and pressed enter key. The String was changed to:Java Code:String message= "Java is fun to learn and it sure is a popular programming language.";
This behavior can be customized in the "Java > Editor > Typing" preference page.Java Code:String message= "Java is fun to learn and it sure” + “is a popular programming language.";