当我使用 Eclipse IDE 创建我的项目时,即使我的代码中存在语法错误,它也会生成一个类文件?
class Test {
public void test(String value) {
System.out.println("TEST CALLED WITH VALUE " + value);
}
}
class Abc {
Test obj = new Test();
public String firstCallToMethodFromTest() {
System.out.println("FIRST CALL TO THE METHOD FROM TEST CLASS");
String result = obj.test("TEST");
return result;
}
public String secondCallToMethodFromTest() {
System.out.println("SECOND CALL TO THE METHOD FROM TEST CLASS");
String result = obj.test();
// There is no such method in test class i.e source code error
return result;
}
}
MethodfirstCallToMethodFromTest
在我的 Struts 动作中作为动作方法被调用。Eclipse 如何为Abc
我的源代码文件中存在语法错误的类编译代码?