new 出问题
// 我写的代码如下,定义了class Ontology,Identifier 和 Lexicon。
import java.io.*;
import java.util.*;
public class BuildPathologieOntology {
public class Ontology {
public Ontology linkSubTypesToType();
public enum Ontology {
mainLanguage, RootIdentifier, RootRelIdentifier
}
}
public class Identifier {
public String value;
public Identifier mainLanguage() {
Identifier mainLanguage = new Identifier("Français");
}
}
public class Lexicon {
public static void getLexicon() {
Lexicon lexicon = new Lexicon(mainLanguage);
}
}
public BuildPathologieOntology() {
Identifier rootIdentifier = new Identifier("universel");
Identifier rootRelIdentifier = new Identifier("relation");
Object[] objs;
try {
// 而这时候,系统显示所有的[color=#FF0000]new都出问题了
// 问题是:java:42: 错误: 无法将类 BuildPathologieOntology.Identifier中的构造器 Identifier应用到给定类型;[/color]
Identifier attribut = [color=#FF0000]new Identifier("attribut");
Identifier objet = new Identifier("objet");
Identifier action = new Identifier("action");
Identifier relation = new Identifier("relation");
Identifier patient = new Identifier("patient");[/color]
[size=16px]// new的格式是否正确?为什么会出现错误?Identifier的定义应该是没问题的呀。望高手帮忙修改。谢谢!