菜鳥求問
service,業務層裡面的每個接口方法都要變成abstract嗎?
public interface JobSeekerManager {
public abstract boolean checkJsUsernameExists(JobSeeker js) throws Exception;
public abstract boolean checkJsEmailExists(JobSeeker js) throws Exception;
public abstract void add(JobSeeker js) throws Exception;
public List<JobSeeker> getJobSeekers()throws Exception;
public JobSeeker loadByJsId(int jsId) throws Exception;
public boolean login(String email, String password) throws Exception;
public boolean deleteJobSeeker(int jsId) throws Exception;
public boolean update(int jsId, String username, String password,
String name, String address, String email, String phone,
int expectedSalary) throws Exception;
}
這個可以不用的,這與接口的使用有關,接口裡面只有靜態常量和靜態抽象方法,所以在接口裡面定義方法的時候,可以省掉abstract static 關鍵字的,也就是說是
public abstract static int find()和public int find()是等同的