Problem formatting in Eclipse

Posted by fastcodejava on Stack Overflow See other posts from Stack Overflow or by fastcodejava
Published on 2010-05-14T11:18:17Z Indexed on 2010/06/05 12:42 UTC
Read the original article Hit count: 199

I have a method in Eclipse as below.

public String toString() {
  return "HouseVo [ "
  + "Name  :  " + this.name == null ? "" : this.name
  + "Address  :  " + this.address == null ? "" : this.address;
}

When I format it becomes:

return "HouseVo [ " + "Name  :  " + this.name == null ? ""
        : this.name + "Address  :  " + this.address == null ? ""
               : this.address;

Any way to fix it so it correctly formats?

© Stack Overflow or respective owner

Related posts about java

Related posts about eclipse