简体   繁体   中英

How do i fix this error message identifier expected?

This is my code

     import com.cordys.cpc.bsf.busobject.BusObjectConfig;
     import com.cordys.cpc.bsf.busobject.BusObjectIterator;
     import com.cordys.cpc.bsf.busobject.QueryObject;



     public class Employee extends EmployeeBase
     {
     public Employee()
     {
          this((BusObjectConfig)null);
     }

    public Employee(BusObjectConfig config)
    {
    super(config);
    }

   public static BusObjectIterator<com.devilsWSAPP.Employee>getEmployeeDetailsByJoiningDate(java.util.Date()JoiningDate)
 {
   String queryText = "select * from Employee where joining_date =:joiningDate";
   QueryObject query = new QueryObject(queryText);
   query.addParamemeter("joiningDate","Employee.joiningDate",QueryObject.PARAM_DATE, joining_date);
   query.setResultClass(Employee.class);
    return query.getObjects();
}}

The error I got is and How do I fix this??

Error during Java compilation: 'java/Source/com/devilsWSAPP/Employee.java:25: error: expected public static BusObjectIterator<com.devilsWSAPP.Employee> getEmployeeDetailsByJoiningDate(java.util.Date()JoiningDate)
1 error '. Using Classpath:

java.util.Date()JoiningDate

I don't know what you think that does, but it's the problem; that isn't java.

Perhaps you meant to write Date joiningDate ? It'd be legal. A mistake, as well - Date doesn't represent dates (yeah, it's a rather unfortunate name). It represents moments in time (and badly at that). You presumably want java.util.Date joiningMoment , or better yet either java.time.Instant joiningMoment , or java.time.LocalDate joiningMoment .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM