-2

I keep getting "Unexpected end of declaration" at the closing brace of the empty constructor. Would someone mind pointing me in the direction of what I'm not understanding? The class is as follows:

package info.welltrak.multi.vos;

import java.io.Serializable;

/**
* Value object model for drinking water systems.
*/
public class WaterSystemVo implements Serializable
{

    /** Empty constructor. */
    public WaterSystemVo()
    { 
    }

    /** Full constructor. *//
    public WaterSystemVo(int id, String systemId, String systemName)
    {
        mId = id;
        mSystemId = systemId;
        mName = systemName;
    }

    public static final long serialVersionUID = 1L;

    private int mId;
    /** Get record id. */
    public int getId(){ return mId; }
    /** Set record id. */
    public void setId(int id){ mId = id; }

    private String mSystemId;
    /** Get water system id number. */
    public String getSystemId(){ return mSystemId; }
    /** Set water system id number. */
    public void setSystemId(String systemId){ mSystemId = systemId; }

    private String mName;
    /** Get water system name. */
    public String getName(){ return mName; }
    /** Set water system name. */
    public void setName(String name){ mName = name; }
}
Giru Bhai
  • 14,370
  • 5
  • 46
  • 74

4 Answers4

1

You have an extra / on the comment line:

/** Full constructor. *//
mclaassen
  • 5,018
  • 4
  • 30
  • 52
1

change this line

/** Full constructor. *//

as below

/** Full constructor. */
Sercan Ozdemir
  • 4,641
  • 3
  • 34
  • 64
0

Use javadoc comments as - /** This is a comment */ not /** This is a comment *//

So Change /** Full constructor. *// to /** Full constructor. */ i.e.

 /** Full constructor. */
        public WaterSystemVo(int id, String systemId, String systemName)
        {
            mId = id;
            mSystemId = systemId;
            mName = systemName;
        }
Giru Bhai
  • 14,370
  • 5
  • 46
  • 74
  • He obviously understands how to make a comment as he does it correctly in a whole bunch of places in the rest of the code. I'm guessing it was a typo. – mclaassen Jun 23 '14 at 13:26
0

Yes, as fellows are saying: The problem is just a extra slash.

Replace:

/** Full constructor. *//

With:

/** Full constructor. */

And try using:

// For Single Line Comments
DiLDoST
  • 335
  • 3
  • 12