请教诸位大家,我定义了一个静态函数
static public ContextIDType getProjectContextIDType(){
ContextIDType contextIDType = objectfactory.createContextIDType();
contextIDType.setID(ProjectName);
return contextIDType;
}
但是我想把其中的ContextIDType contextIDType定义为一个静态变量,如何在定义变量的时候把contextIDType.setID(ProjectName);这条语句也执行了?