意外的声明结束 - 在Android AIDE中

时间:2014-06-23 13:12:52

标签: java android aide-ide

我一直在空构造函数的右括号中得到“Unexpected end of declaration”。有人会介意我指出我不理解的方向吗?课程如下:

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; }
}

4 个答案:

答案 0 :(得分:1)

评论专栏还有一个/

/** Full constructor. *//

答案 1 :(得分:1)

更改此行

/** Full constructor. *//

如下

/** Full constructor. */

答案 2 :(得分:0)

将javadoc评论用作 - /** This is a comment */而不是/** This is a comment *//

所以将/** Full constructor. *//更改为/** Full constructor. */

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

答案 3 :(得分:0)

是的,正如同伙们所说:问题只是一个额外的斜线。

替换:

/** Full constructor. *//

使用:

/** Full constructor. */

并尝试使用:

// For Single Line Comments