我一直在空构造函数的右括号处获得" 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; }
}
在注释行有一个额外的/
:
/** Full constructor. *//
改变这一行
/** Full constructor. *//
如下图
/** Full constructor. */
使用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;
}
是的,正如人们所说:问题只是多了一个斜杠。
替换:
/** Full constructor. *//
:
/** Full constructor. */
并尝试使用:
// For Single Line Comments